Skip to content

Commit

Permalink
Merge branch 'pybamm-team:main' into newtestinfra
Browse files Browse the repository at this point in the history
  • Loading branch information
santacodes authored Jul 22, 2024
2 parents 7ad77d5 + 85869e9 commit 0c8c51a
Showing 1 changed file with 34 additions and 33 deletions.
67 changes: 34 additions & 33 deletions {{cookiecutter.project_name}}/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -118,40 +118,41 @@ port.exclude_lines = [
]

[tool.ruff]
extend-include = ["*.ipynb"]
extend-exclude = ["__init__.py"]
select = [
"E", "F", "W", # flake8
"B", # flake8-bugbear
"I", # isort
#"ARG", # flake8-unused-arguments
"C4", # flake8-comprehensions
"EM", # flake8-errmsg
"ICN", # flake8-import-conventions
"ISC", # flake8-implicit-str-concat
"G", # flake8-logging-format
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PL", # pylint
"PT", # flake8-pytest-style
"PTH", # flake8-use-pathlib
#"RET", # flake8-return
"RUF", # Ruff-specific
"SIM", # flake8-simplify
"T20", # flake8-print
"UP", # pyupgrade
"YTT", # flake8-2020
"EXE", # flake8-executable
"NPY", # NumPy specific rules
"PD", # pandas-vet
]
src = ["src"]
exclude = []
isort.required-imports = ["from __future__ import annotations"]
flake8-unused-arguments.ignore-variadic-names = true


[tool.ruff.lint]
extend-select = [
"B", # flake8-bugbear
"RUF", # Ruff-specific
"UP", # pyupgrade
"YTT", # flake8-2020
"TID252", # relative-imports
unfixable = [
"T20", # Removes print statements
"F841", # Removes unused variables
]
ignore = [
"E741", # Ambiguous variable name
"RUF012", # Mutable class attributes should be annotated with `typing.ClassVar`
"SIM108", # Use ternary operator
"ARG001", # Unused function argument:
"ARG002", # Unused method arguments
"PLR2004", # Magic value used in comparison
"PLR0915", # Too many statements
"PLR0913", # Too many arguments
"PLR0912", # Too many branches
"RET504", # Unnecessary assignment
"RET505", # Unnecessary `else`
"RET506", # Unnecessary `elif`
"B018", # Found useless expression
"RUF002", # Docstring contains ambiguous
"UP007", # For pyupgrade
"E741", # Ambiguous variable name
"E501", # Line too long
"PLR2004", # Magic value used in comparison
]

[tool.ruff.lint.per-file-ignores]
"tests/*" = ["T20"]
"docs/*" = ["T20"]
line-length = 100
exclude = []
flake8-unused-arguments.ignore-variadic-names = true

0 comments on commit 0c8c51a

Please sign in to comment.