Skip to content

Commit

Permalink
chore: update ruff config (#154)
Browse files Browse the repository at this point in the history
  • Loading branch information
henryiii authored Oct 28, 2023
1 parent e4910a4 commit d5add10
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 16 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12-dev"]
python-version: ["3.10", "3.11", "3.12"]
runs-on: [ubuntu-latest, macos-latest, windows-latest]

steps:
Expand Down Expand Up @@ -106,4 +106,4 @@ jobs:
- name: Run repo-review action
uses: ./
with:
plugins: sp-repo-review==2023.07.13
plugins: sp-repo-review==2023.10.27
24 changes: 10 additions & 14 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ cli = [
]
test = [
"pytest >=7",
"sp-repo-review >=2023.08.23",
"sp-repo-review >=2023.10.27",
"validate-pyproject >=0.14",
]
dev = [
Expand Down Expand Up @@ -91,7 +91,7 @@ addopts = ["-ra", "--strict-markers", "--strict-config", "--import-mode=importli
xfail_strict = true
log_cli_level = "INFO"
filterwarnings = [
'error',
"error",
]
testpaths = ["tests"]
pythonpath = ["tests/test_utilities"]
Expand Down Expand Up @@ -136,8 +136,10 @@ messages_control.disable = [


[tool.ruff]
select = [
"E", "F", "W", # flake8
src = ["src"]

[tool.ruff.lint]
extend-select = [
"B", # flake8-bugbear
"I", # isort
"ARG", # flake8-unused-arguments
Expand All @@ -158,20 +160,14 @@ select = [
"UP", # pyupgrade
"YTT", # flake8-2020
]
extend-ignore = [
ignore = [
"PLR", # Design related pylint codes
"E501", # Line too long
"PT004", # Incorrect check, usefixtures is the correct way to do this
]
src = ["src"]
unfixable = [
"T20", # Removes print statements
"F841", # Removes unused variables
"ISC001", # May collide with formatter
]
typing-modules = ["repo_review._compat.typing"]
flake8-unused-arguments.ignore-variadic-names = true

[tool.ruff.flake8-tidy-imports.banned-api]
[tool.ruff.lint.flake8-tidy-imports.banned-api]
"typing.Callable".msg = "Use collections.abc.Callable instead."
"typing.Iterator".msg = "Use collections.abc.Iterator instead."
"typing.Mapping".msg = "Use collections.abc.Mapping instead."
Expand All @@ -181,7 +177,7 @@ flake8-unused-arguments.ignore-variadic-names = true
"importlib.abc".msg = "Use repo_review._compat.importlib.resources.abc instead."
"importlib.resources.abc".msg = "Use repo_review._compat.importlib.resources.abc instead."

[tool.ruff.per-file-ignores]
[tool.ruff.lint.per-file-ignores]
"src/repo_review/_compat/**.py" = ["TID251"]
"src/**/__main__.py" = ["T20"]

Expand Down

0 comments on commit d5add10

Please sign in to comment.