Skip to content

Commit

Permalink
fix pre-commit errors caused by ruff update
Browse files Browse the repository at this point in the history
  • Loading branch information
Constantin Gahr committed Apr 2, 2024
1 parent e04ff42 commit d859c61
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 56 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ repos:
- id: pytest
name: pytest
entry: pytest
language: conda
language: python
pass_filenames: false
always_run: true
fail_fast: true
107 changes: 52 additions & 55 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ Changelog = "https://github.com/cgahr/latexplotlib/blob/main/CHANGES.md"
Homepage = "https://github.com/cgahr/latexplotlib"
Issues = "https://github.com/cgahr/latexplotlib/issues"

[tool.black]
line_length = 88

[tool.coverage.report]
exclude_lines = ["if TYPE_CHECKING:"]

Expand All @@ -58,6 +55,58 @@ source = ["src"]
[tool.isort]
profile = "black"

[tool.lint.ruff]
fix = true
fixable = ["I"]
ignore = [
"ANN101" # missing-type-self
]
select = [
"A",
"ANN",
"ARG",
"B",
"BLE",
"C4",
"C90",
"DTZ",
"E",
"EM",
"ERA",
"EXE",
"F",
"FBT", # unclear if good or not
"G",
"I",
"ICN",
"INP",
"ISC",
"N",
"NPY",
"PGH",
"PIE",
"PL",
"PT",
"PTH",
"PYI",
"RET",
"RSE",
"RUF",
"S",
"SIM",
"SLF",
"T10",
"T20",
"TCH",
"TID",
"TRY",
# "D",
"UP",
"W",
"YTT"
]
target-version = "py38"

[tool.mypy]
check_untyped_defs = true
exclude = [
Expand Down Expand Up @@ -93,58 +142,6 @@ testpaths = [
"tests"
]

[tool.ruff]
fix = true
fixable = ["I"]
ignore = [
"ANN101" # missing-type-self
]
select = [
"F",
"E",
"W",
"C90",
"I",
"N",
# "D",
"UP",
"YTT",
"ANN",
"S",
"BLE",
"FBT", # unclear if good or not
"B",
"A",
"C4",
"DTZ",
"T10",
"EM",
"EXE",
"ISC",
"ICN",
"G",
"INP",
"PIE",
"T20",
"PYI",
"PT",
"RSE",
"RET",
"SLF",
"SIM",
"TID",
"TCH",
"ARG",
"PTH",
"ERA",
"PGH",
"PL",
"TRY",
"NPY",
"RUF"
]
target-version = "py38"

[tool.ruff.flake8-annotations]
suppress-dummy-args = true

Expand Down

0 comments on commit d859c61

Please sign in to comment.