Skip to content

Commit

Permalink
Use ruff for formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
dvolodin7 committed Mar 2, 2025
1 parent ed26b5f commit 9b3cf81
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 7 deletions.
4 changes: 1 addition & 3 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@
"settings": {
"python.defaultInterpreterPath": "/usr/local/bin/python",
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter",
"black-formatter.path": "/usr/local/bin/black",
"editor.defaultFormatter": "charliermarsh.ruff",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll": true
Expand All @@ -45,7 +44,6 @@
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"ms-python.python",
"ms-python.black-formatter",
"yzhang.markdown-all-in-one",
"ms-azuretools.vscode-docker",
"be5invis.toml",
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/py-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
run: pip install -IU -r ./.requirements/deps.txt -r ./.requirements/lint.txt -r ./.requirements/test.txt

- name: Check Formatting
run: black --check src/ tests/
run: ruff format --check src/ tests/

- name: Check Ruff
run: ruff -q src/ tests/
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ To see unreleased changes, please see the [CHANGELOG on the master branch](https

* Kafka flushes every message on single-node installations.

### Infrastructure

* Use `ruff` for formatting

## 0.7.0 - 2025-01-23

### Fixed
Expand Down
1 change: 1 addition & 0 deletions src/gufo/thor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@
Attributes:
__version__: Gufo Thor version
"""

__version__: str = "0.7.0"
1 change: 1 addition & 0 deletions src/gufo/thor/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
Attributes:
NAME: Utility name
"""

# Python modules
import argparse
import contextlib
Expand Down
1 change: 1 addition & 0 deletions src/gufo/thor/services/bh.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
Attributes:
bh: bh service singleton.
"""

# Gufo Thor modules
from .noc import NocService

Expand Down
4 changes: 1 addition & 3 deletions tests/test_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,4 @@ def test_links(doc: str) -> None:
def test_rfc_links(doc: str) -> None:
data = get_file(doc)
match = rx_datatracker_ietf.search(data)
assert (
not match
), f"{match.group(0)} link used. Must be https://www.rfc-editor.org/rfc/{match.group(1)}.html"
assert not match, f"{match.group(0)} link used. Must be https://www.rfc-editor.org/rfc/{match.group(1)}.html"

0 comments on commit 9b3cf81

Please sign in to comment.