Skip to content

Commit

Permalink
clean: remove linting exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
bolinocroustibat committed Aug 28, 2024
1 parent 3faa7b6 commit e063237
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ repos:
- id: check-added-large-files

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.4 # Ruff version
rev: v0.6.2 # Ruff version
hooks:
# Run the linter
- id: ruff
Expand Down
2 changes: 1 addition & 1 deletion api.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
)

# Load app name, version, commit variables from config file
# Need an absolute path for when we launch the scripts not from the project root dir (tweet command from cron, for example) # noqa: E501
# Need an absolute path for when we launch the scripts not from the project root dir (tweet command from cron, for example)
pyproject_filepath = Path(__file__).parent / "pyproject.toml"
with open(pyproject_filepath, "rb") as f:
config: dict = tomllib.load(f)
Expand Down
13 changes: 7 additions & 6 deletions common/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from .authenticate import authenticate # noqa: F401
from .capitalize import capitalize, decapitalize # noqa: F401
from .generate_word import generate_word, generate_word_and_save # noqa: F401
from .prepare_db import prepare_db # noqa: F401
from .real_word import if_real_exists # noqa: F401
from .style_text import style_text # noqa: F401
# ruff: noqa F401
from .authenticate import authenticate
from .capitalize import capitalize, decapitalize
from .generate_word import generate_word, generate_word_and_save
from .prepare_db import prepare_db
from .real_word import if_real_exists
from .style_text import style_text
9 changes: 5 additions & 4 deletions en/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from .alter_text import alter_text_en # noqa: F401
from .classify import classify_en # noqa: F401
from .generate_definition import generate_definition_en # noqa: F401
from .generate_tweet import generate_tweet_en # noqa: F401
# noqa: F401
from .alter_text import alter_text_en
from .classify import classify_en
from .generate_definition import generate_definition_en
from .generate_tweet import generate_tweet_en
2 changes: 1 addition & 1 deletion en/generate_definition.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ async def get_random_definition_en() -> dict:
while (not definition) or (type not in ALLOWED_TYPES_EN):
if count > 0:
print(
f"Definition for word '{real_string}' or type '{type}' not supported, trying another word and definition..." # noqa: E501
f"Definition for word '{real_string}' or type '{type}' not supported, trying another word and definition..."
)
word = await RealWordEN.annotate(order=Random()).order_by("order").limit(1)
real_string = word[0].string
Expand Down
11 changes: 6 additions & 5 deletions fr/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from .alter_text import alter_text_fr # noqa: F401
from .classify import classify_fr # noqa: F401
from .correct_text import correct_text_fr # noqa: F401
from .generate_definition import generate_definition_fr # noqa: F401
from .generate_tweet import generate_tweet_fr # noqa: F401
# ruff: noqa F401
from .alter_text import alter_text_fr
from .classify import classify_fr
from .correct_text import correct_text_fr
from .generate_definition import generate_definition_fr
from .generate_tweet import generate_tweet_fr
11 changes: 4 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,12 @@ Homepage = ""
requires = ["pdm-pep517>=1.0.0"]
build-backend = "pdm.pep517.api"

[tool]
rye = { dev-dependencies = ["pre-commit>=3.7.1", "ruff>=0.5.4"] }

[tool.pdm]
includes = []

[tool.pdm.dev-dependencies]
dev = ["pre-commit>=3.7.1", "ruff>=0.5.4"]
dev-dependencies = { dev = ["ruff>=0.6.2"] }

[tool.ruff]
lint = { select = ["I"] }
line-length = 100

[tool.rye]
dev-dependencies = ["ruff>=0.6.2"]

0 comments on commit e063237

Please sign in to comment.