diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d70fbfe..0354ada 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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 diff --git a/api.py b/api.py index b70dd43..ae43c67 100644 --- a/api.py +++ b/api.py @@ -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) diff --git a/common/__init__.py b/common/__init__.py index cfdd4e2..a1f55f1 100644 --- a/common/__init__.py +++ b/common/__init__.py @@ -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 diff --git a/en/__init__.py b/en/__init__.py index c553850..0e46f97 100644 --- a/en/__init__.py +++ b/en/__init__.py @@ -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 diff --git a/en/generate_definition.py b/en/generate_definition.py index af36190..d72f82d 100644 --- a/en/generate_definition.py +++ b/en/generate_definition.py @@ -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 diff --git a/fr/__init__.py b/fr/__init__.py index 22d4c81..32b14b9 100644 --- a/fr/__init__.py +++ b/fr/__init__.py @@ -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 diff --git a/pyproject.toml b/pyproject.toml index fdc2e57..e7a86c5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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"]