Skip to content

Commit bd35e5f

Browse files
Add ruff check (for Python 3.10) (#65)
* Add ruff check * Remove outdated benchmark * Poetry lock
1 parent ebec12e commit bd35e5f

22 files changed

+103
-458
lines changed

asv.conf.json

Lines changed: 0 additions & 157 deletions
This file was deleted.

benchmarks/__init__.py

Whitespace-only changes.

benchmarks/benchmarks.py

Lines changed: 0 additions & 117 deletions
This file was deleted.

poetry.lock

Lines changed: 1 addition & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ typing-extensions = "^4.7.1"
3131
betterproto2-rust-codec = { version = "^0.1.2", optional = true }
3232

3333
[tool.poetry.group.dev.dependencies]
34-
asv = "^0.4.2"
3534
mypy = "^1.11.2"
3635
pre-commit = "^2.17.0"
3736
tox = "^4.0.0"
@@ -53,7 +52,7 @@ protobuf = "^4"
5352
cachelib = "^0.10.2"
5453

5554
[tool.ruff]
56-
extend-exclude = ["tests/output_*", "src/betterproto2/lib"]
55+
extend-exclude = ["tests/output_*", "src/betterproto2/internal_lib"]
5756
target-version = "py310"
5857
line-length = 120
5958

@@ -68,6 +67,8 @@ select = [
6867
"SIM102", # Simplify return or yield statements
6968
"SIM103", # Simplify list/set/dict comprehensions
7069

70+
"UP",
71+
7172
"I",
7273
]
7374

@@ -96,7 +97,7 @@ sequence = ["_format", "_sort-imports"]
9697
help = "Format the source code, and sort the imports"
9798

9899
[tool.poe.tasks.check]
99-
sequence = ["_check-format", "_check-imports"]
100+
sequence = ["_check-format", "_check"]
100101
help = "Check that the source code is formatted and the imports sorted"
101102

102103
[tool.poe.tasks._format]
@@ -111,21 +112,13 @@ help = "Sort the imports"
111112
cmd = "ruff format --diff src tests"
112113
help = "Check that the source code is formatted"
113114

114-
[tool.poe.tasks._check-imports]
115-
cmd = "ruff check --select I src tests"
116-
help = "Check that the imports are sorted"
117-
118-
[tool.poe.tasks.docs]
119-
cmd = "sphinx-build docs docs/build"
120-
help = "Build the sphinx docs"
121-
122-
[tool.poe.tasks.bench]
123-
shell = "asv run master^! && asv run HEAD^! && asv compare master HEAD"
124-
help = "Benchmark current commit vs. master branch"
115+
[tool.poe.tasks._check]
116+
cmd = "ruff check src tests"
117+
help = "Check the code"
125118

126119
[tool.poe.tasks.clean]
127120
cmd = """
128-
rm -rf .asv .coverage .mypy_cache .pytest_cache
121+
rm -rf .coverage .mypy_cache .pytest_cache
129122
dist betterproto.egg-info **/__pycache__
130123
testsoutput_*
131124
"""

0 commit comments

Comments
 (0)