Skip to content

Commit

Permalink
Merge pull request #24 from us-irs/use-ruff-format
Browse files Browse the repository at this point in the history
use ruff formatter
  • Loading branch information
robamu authored Nov 27, 2024
2 parents 15f2025 + a2c8342 commit 4d84e8b
Show file tree
Hide file tree
Showing 5 changed files with 23 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 # noqa: E501
}
)

Expand Down
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ ignore = [
"N818", # Exception names should end in "Error", requires API change
"S101", # Use of assert, should be changed in the future
"ANN204", # Do not use return typing on __init__, __new__ and __call__ methods
"E111", # Recommended to be disabled when using the ruff formatter
"E114" # Recommended to be disabled when using the ruff formatter
]

[tool.ruff.lint.extend-per-file-ignores]
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 4d84e8b

Please sign in to comment.