Skip to content

Commit 01e2224

Browse files
authored
Update ruff (#621)
1 parent 77f3c75 commit 01e2224

31 files changed

+101
-94
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ clean-test: ## remove test and coverage artifacts
4848
rm -fr htmlcov/
4949

5050
lint: ## check style with ruff and black
51-
pdm run ruff src/ tests bench
51+
pdm run ruff check src/ tests bench
5252
pdm run black --check src tests docs/conf.py
5353

5454
test: ## run tests quickly with the default Python

pdm.lock

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

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,8 @@ exclude_also = [
116116

117117
[tool.ruff]
118118
src = ["src", "tests"]
119+
120+
[tool.ruff.lint]
119121
select = [
120122
"E", # pycodestyle
121123
"W", # pycodestyle
@@ -144,7 +146,6 @@ ignore = [
144146
"S101", # assert
145147
"S307", # hands off my eval
146148
"SIM300", # Yoda rocks in asserts
147-
"PGH001", # No eval lol?
148149
"PGH003", # leave my type: ignores alone
149150
"B006", # mutable argument defaults
150151
"DTZ001", # datetimes in tests

src/cattr/__init__.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22
from .gen import override
33

44
__all__ = (
5-
"global_converter",
6-
"unstructure",
7-
"structure",
8-
"structure_attrs_fromtuple",
9-
"structure_attrs_fromdict",
10-
"UnstructureStrategy",
115
"BaseConverter",
126
"Converter",
137
"GenConverter",
8+
"UnstructureStrategy",
9+
"global_converter",
1410
"override",
11+
"structure",
12+
"structure_attrs_fromdict",
13+
"structure_attrs_fromtuple",
14+
"unstructure",
1515
)
1616
from cattrs import global_converter
1717

src/cattr/preconf/json.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
from cattrs.preconf.json import JsonConverter, configure_converter, make_converter
44

5-
__all__ = ["configure_converter", "JsonConverter", "make_converter"]
5+
__all__ = ["JsonConverter", "configure_converter", "make_converter"]

src/cattr/preconf/msgpack.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
from cattrs.preconf.msgpack import MsgpackConverter, configure_converter, make_converter
44

5-
__all__ = ["configure_converter", "make_converter", "MsgpackConverter"]
5+
__all__ = ["MsgpackConverter", "configure_converter", "make_converter"]

src/cattr/preconf/orjson.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
from cattrs.preconf.orjson import OrjsonConverter, configure_converter, make_converter
44

5-
__all__ = ["configure_converter", "make_converter", "OrjsonConverter"]
5+
__all__ = ["OrjsonConverter", "configure_converter", "make_converter"]

src/cattr/preconf/pyyaml.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
from cattrs.preconf.pyyaml import PyyamlConverter, configure_converter, make_converter
44

5-
__all__ = ["configure_converter", "make_converter", "PyyamlConverter"]
5+
__all__ = ["PyyamlConverter", "configure_converter", "make_converter"]

src/cattr/preconf/tomlkit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
from cattrs.preconf.tomlkit import TomlkitConverter, configure_converter, make_converter
44

5-
__all__ = ["configure_converter", "make_converter", "TomlkitConverter"]
5+
__all__ = ["TomlkitConverter", "configure_converter", "make_converter"]

src/cattr/preconf/ujson.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
from cattrs.preconf.ujson import UjsonConverter, configure_converter, make_converter
44

5-
__all__ = ["configure_converter", "make_converter", "UjsonConverter"]
5+
__all__ = ["UjsonConverter", "configure_converter", "make_converter"]

0 commit comments

Comments
 (0)