diff --git a/.github/workflows/test-only.yml b/.github/workflows/test-only.yml index 246d254cb..ec4fd705f 100644 --- a/.github/workflows/test-only.yml +++ b/.github/workflows/test-only.yml @@ -11,8 +11,8 @@ jobs: - name: Lint with Ruff run: | pip install ruff - # Check for syntax errors and undefined names - ruff check . --select E9,F63,F7,F82 + # Check for syntax errors and undefined names, and gettext misuse + ruff check . --select E9,F63,F7,F82,INT # Complete check with errors treated as warnings ruff check . --exit-zero - name: Validate OpenAPI spec diff --git a/.ruff.toml b/.ruff.toml index a58e4766e..259be2fb4 100644 --- a/.ruff.toml +++ b/.ruff.toml @@ -20,10 +20,11 @@ exclude = [ select = [ "B", # flake8-bugbear "B9", - "C", + "C", "E", # pycodestyle "F", # Pyflakes "I", # isort + "INT", # flake8-gettext "N", # pep8-naming "UP", # pyupgrade "W", # pycodestyle @@ -43,6 +44,9 @@ ignore = [ [lint.mccabe] max-complexity = 12 +[lint.flake8-gettext] +extend-function-names = ["_l", "lazy_gettext", "pgettext", "npgettext"] + [format] indent-style = "space" quote-style = "preserve"