Skip to content

Commit e7a3cb6

Browse files
authored
chore: improve pyproject.toml from sp-repo-review checks (#1511)
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
1 parent 60cc8a8 commit e7a3cb6

File tree

2 files changed

+21
-40
lines changed

2 files changed

+21
-40
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,9 @@ repos:
2626
- repo: https://github.com/astral-sh/ruff-pre-commit
2727
rev: v0.13.3
2828
hooks:
29-
- id: ruff
29+
- id: ruff-check
3030
args: [--fix, --show-fixes]
3131

32-
33-
- repo: https://github.com/asottile/pyupgrade
34-
rev: v3.20.0
35-
hooks:
36-
- id: pyupgrade
37-
args: [--py38-plus]
38-
3932
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
4033
rev: v2.15.0
4134
hooks:

pyproject.toml

Lines changed: 20 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,6 @@ test-pyodide = [
4545
{include-group = "test-core"}
4646
]
4747

48-
[lint.mccabe]
49-
max-complexity = 100
50-
5148
[project]
5249
authors = [
5350
{name = "Jim Pivarski", email = "jpivarski@gmail.com"}
@@ -57,7 +54,6 @@ classifiers = [
5754
"Intended Audience :: Developers",
5855
"Intended Audience :: Information Technology",
5956
"Intended Audience :: Science/Research",
60-
"License :: OSI Approved :: BSD License",
6157
"Operating System :: MacOS",
6258
"Operating System :: POSIX",
6359
"Operating System :: Unix",
@@ -114,12 +110,8 @@ Homepage = "https://github.com/scikit-hep/uproot5"
114110
version-file = "src/uproot/version.py"
115111

116112
[tool.hatch.version]
117-
path = "src/uproot/__init__.py"
118113
source = "vcs"
119114

120-
[tool.isort]
121-
profile = "black"
122-
123115
[tool.pytest.ini_options]
124116
addopts = ["-ra", "--showlocals", "--strict-markers", "--strict-config"]
125117
filterwarnings = [
@@ -128,7 +120,7 @@ filterwarnings = [
128120
"ignore:unclosed transport <asyncio.sslproto._SSLProtocolTransport", # https://github.com/aio-libs/aiohttp/issues/1115
129121
"ignore: .*will default to writing RNTuples.*:FutureWarning"
130122
]
131-
log_cli_level = "info"
123+
log_cli_level = "INFO"
132124
markers = [
133125
"slow",
134126
"network",
@@ -140,39 +132,22 @@ testpaths = ["tests"]
140132
timeout = 600
141133
xfail_strict = true
142134

135+
[tool.repo-review]
136+
ignore = ["PY004"]
137+
143138
[tool.ruff]
144139
exclude = [
145140
"tests/*.py",
146141
"tests-cuda/*.py",
147142
"src/uproot/__init__.py",
148143
"docs-sphinx/*.py"
149144
]
150-
src = ["src"]
151145

152146
[tool.ruff.lint]
153-
ignore = [
154-
"E501",
155-
"E722",
156-
"PLR",
157-
"PLW0120", # else on loop without break
158-
"SIM118", # key in dict, broken since uproot doesn't behave like a dict
159-
"PGH003", # too-broad type ignore
160-
"SIM114", # combine `if` branches using logical `or` operator
161-
"S307", # no eval allowed
162-
"PLC1901", # empty string is falsey (but I don't want to rely on such weak typing)
163-
"RUF012", # enforces type annotations on a codebase that lacks type annotations
164-
"SIM103", # interferes with my if-elif-elif-else blocks
165-
"PLC0415", # imports outside top level
166-
"PLW1641" # __eq__ without __hash__
167-
]
168-
select = [
169-
"E",
170-
"F",
171-
"W", # flake8
172-
"B",
173-
"B904", # flake8-bugbear
147+
extend-select = [
148+
"B", # flake8-bugbear
174149
"I", # isort
175-
# "ARG", # flake8-unused-arguments
150+
# "ARG", # flake8-unused-arguments
176151
"C4", # flake8-comprehensions
177152
"ISC", # flake8-implicit-str-concat
178153
"PGH", # pygrep-hooks
@@ -185,6 +160,19 @@ select = [
185160
"UP", # pyupgrade
186161
"YTT" # flake8-2020
187162
]
163+
ignore = [
164+
"PGH003", # too-broad type ignore
165+
"PLC0415", # imports outside top level
166+
"PLC1901", # empty string is falsey (but I don't want to rely on such weak typing)
167+
"PLR",
168+
"PLW0120", # else on loop without break
169+
"PLW1641", # __eq__ without __hash__
170+
"RUF012", # enforces type annotations on a codebase that lacks type annotations
171+
"S307", # no eval allowed
172+
"SIM103", # interferes with my if-elif-elif-else blocks
173+
"SIM114", # combine `if` branches using logical `or` operator
174+
"SIM118" # key in dict, broken since uproot doesn't behave like a dict
175+
]
188176
isort.required-imports = ["from __future__ import annotations"]
189177

190178
[tool.ruff.lint.per-file-ignores]

0 commit comments

Comments
 (0)