Skip to content

Commit b6fad93

Browse files
committed
Switch code style checks to ruff
1 parent d4c8698 commit b6fad93

4 files changed

Lines changed: 28 additions & 37 deletions

File tree

bin/lint.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,8 @@ cd "$dir/.."
66
exitCode=0
77
uv run validate-pyproject pyproject.toml
88
code=$?; test $code -eq 0 || exitCode=$code
9-
uv run black src tests
9+
uv run ruff check --fix
1010
code=$?; test $code -eq 0 || exitCode=$code
11-
uv run isort src tests
12-
code=$?; test $code -eq 0 || exitCode=$code
13-
uv run python -m flake8 src tests
11+
uv run ruff format
1412
code=$?; test $code -eq 0 || exitCode=$code
1513
exit $exitCode

pyproject.toml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,9 @@ dependencies = [
3434

3535
[dependency-groups]
3636
dev = [
37-
"autopep8",
38-
"black",
3937
"build",
40-
"flake8",
41-
"flake8-pyproject",
42-
"flake8-typing-imports",
43-
"isort",
4438
"pytest",
45-
"numpy",
39+
"ruff",
4640
"toml",
4741
"validate-pyproject[all]",
4842
]

src/appose/python_worker.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,6 @@ def _respond(self, response_type: ResponseType, args: Args | None) -> None:
187187

188188

189189
class Worker:
190-
191190
def __init__(self):
192191
self.tasks = {}
193192
self.queue: list[Task] = []

tests/test_types.py

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -33,35 +33,35 @@
3333

3434

3535
class TypesTest(unittest.TestCase):
36+
# fmt: off
3637
JSON = (
3738
"{"
38-
'"posByte":123,"negByte":-98,'
39-
'"posDouble":9.876543210123456,"negDouble":-1.234567890987654e+302,'
40-
'"posFloat":9.876543,"negFloat":-1.2345678,'
41-
'"posInt":1234567890,"negInt":-987654321,'
42-
'"posLong":12345678987654321,"negLong":-98765432123456789,'
43-
'"posShort":32109,"negShort":-23456,'
44-
'"trueBoolean":true,"falseBoolean":false,'
45-
'"nullChar":"\\u0000",'
46-
'"aString":"-=[]\\\\;\',./_+{}|:\\"<>?'
47-
"AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz"
48-
'~!@#$%^&*()",'
49-
'"numbers":[1,1,2,3,5,8],'
50-
'"words":["quick","brown","fox"],'
51-
# fmt: off
52-
'"ndArray":{'
53-
'"appose_type":"ndarray",' # noqa: E131
54-
'"dtype":"float32",' # noqa: E131
55-
'"shape":[2,20,25],' # noqa: E131
56-
'"shm":{' # noqa: E131
57-
'"appose_type":"shm",' # noqa: E131
58-
'"name":"SHM_NAME",' # noqa: E131
59-
'"rsize":4000' # noqa: E131
60-
"}" # noqa: E131
61-
"}"
62-
# fmt: on
39+
'"posByte":123,"negByte":-98,'
40+
'"posDouble":9.876543210123456,"negDouble":-1.234567890987654e+302,'
41+
'"posFloat":9.876543,"negFloat":-1.2345678,'
42+
'"posInt":1234567890,"negInt":-987654321,'
43+
'"posLong":12345678987654321,"negLong":-98765432123456789,'
44+
'"posShort":32109,"negShort":-23456,'
45+
'"trueBoolean":true,"falseBoolean":false,'
46+
'"nullChar":"\\u0000",'
47+
'"aString":"-=[]\\\\;\',./_+{}|:\\"<>?'
48+
"AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz"
49+
'~!@#$%^&*()",'
50+
'"numbers":[1,1,2,3,5,8],'
51+
'"words":["quick","brown","fox"],'
52+
'"ndArray":{'
53+
'"appose_type":"ndarray",'
54+
'"dtype":"float32",'
55+
'"shape":[2,20,25],'
56+
'"shm":{'
57+
'"appose_type":"shm",'
58+
'"name":"SHM_NAME",'
59+
'"rsize":4000'
60+
"}"
61+
"}"
6362
"}"
6463
)
64+
# fmt: on
6565

6666
STRING = (
6767
"-=[]\\;',./_+{}|:\"<>?"

0 commit comments

Comments
 (0)