Skip to content

Commit

Permalink
Add Ruff config
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinHammarstedt committed Jan 22, 2024
1 parent 94625b4 commit ab0e684
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ dev = [
"pandocfilters==1.5.0",
"pytest>=6.0.0",
"pytest-sugar>=0.9.6",
"ruff"
]

[project.urls]
Expand All @@ -56,6 +57,57 @@ publish.index.disable = true # Require confirmation to publish
[tool.black]
line-length = 120

[tool.ruff]
line-length = 120

[tool.ruff.lint]
select = [
"A", # flake8-builtins
"ANN", # flake8-annotations
"ARG", # flake8-unused-arguments
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"COM", # flake8-commas
"D", # pydocstyle
"D400", # pydocstyle: ends-in-period
"D401", # pydocstyle: non-imperative-mood
"E", # pycodestyle: errors
"F", # Pyflakes
"FLY", # flynt
"FURB", # refurb
"G", # flake8-logging-format
"I", # isort
"ISC", # flake8-implicit-str-concat
"N", # pep8-naming
"PERF", # Perflint
"PL", # Pylint
"PT", # flake8-pytest-style
"PTH", # flake8-use-pathlib
"Q", # flake8-quotes
"RET", # flake8-return
"RSE", # flake8-raise
"RUF", # Ruff-specific rules
"SIM", # flake8-simplify
"T20", # flake8-print
"TID", # flake8-tidy-imports
"UP", # pyupgrade
"W", # pycodestyle: warnings
]
ignore = [
"ANN101", # flake8-annotations: missing-type-self
"ANN102", # flake8-annotations: missing-type-cls
"B008", # flake8-bugbear: function-call-in-default-argument
"COM812", # flake8-commas: missing-trailing-comma
"PLR09", # Pylint: too-many-*
"SIM105", # flake8-simplify: suppressible-exception
]

[tool.ruff.per-file-ignores]
"__init__.py" = ["F401"]

[tool.ruff.lint.pydocstyle]
convention = "google"

[tool.pytest.ini_options]
addopts = "-s -v --tb=no"
testpaths = ["tests"]
Expand Down

0 comments on commit ab0e684

Please sign in to comment.