Skip to content

Commit

Permalink
use ruff formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
robamu committed Nov 27, 2024
1 parent 15f2025 commit eed70e3
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 12 deletions.
26 changes: 18 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,17 @@ The underlying base packet library used to generate the packets to be sent is th

You can install this package from PyPI

Linux:
Install command assuming an active virtual environment:

```sh
python3 -m pip install cfdp-py
pip install cfdp-py
```

Windows:

```sh
py -m pip install cfdp-py
```

# Examples

You can find all examples [inside the documentation](https://cfdp-py.readthedocs.io/en/latest/examples.html) and the `examples` directory of this repository.
You can find all examples [inside the documentation](https://cfdp-py.readthedocs.io/en/latest/examples.html)
and the `examples` directory of this repository.

# Tests

Expand Down Expand Up @@ -75,3 +71,17 @@ You can run the doctests with
```sh
make doctest
```

# Formatting and Linting

Linting:

```sh
ruff check .
```

Formatting:

```sh
ruff format .
```
3 changes: 1 addition & 2 deletions examples/cfdp-cli-udp/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,7 @@ def transaction_indication(
)
self.active_proxy_put_reqs.update(
{
transaction_indication_params.transaction_id:
transaction_indication_params.originating_transaction_id
transaction_indication_params.transaction_id: transaction_indication_params.originating_transaction_id

Check failure on line 145 in examples/cfdp-cli-udp/common.py

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 3.11)

Ruff (E501)

examples/cfdp-cli-udp/common.py:145:101: E501 Line too long (122 > 100)
}
)

Expand Down
2 changes: 1 addition & 1 deletion release-checklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The steps shown here are for Ubuntu/MacOS.
3. Update `CHANGELOG.md`: Convert `unreleased` section into version section
with date and new `unreleased`section.
4. Run tests with `pytest .`
5. Run auto-formatter with `black .`
5. Run auto-formatter with `ruff format .`
6. Run linter with `ruff check .`
7. Wait for CI/CD results. This also runs the tests on different operating systems

Expand Down
2 changes: 1 addition & 1 deletion src/cfdppy/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class PutRequest:
:py:class:`tmtccmd.config.defs.CfdpParams` class with the generic
:py:func:`tmtccmd.config.cfdp.generic_cfdp_params_to_put_request` API and/or all related
specific APIs.
"""
"""

destination_id: UnsignedByteField
# All the following fields are optional because a put request can also be a metadata-only
Expand Down

0 comments on commit eed70e3

Please sign in to comment.