Skip to content

Commit 933b9ec

Browse files
committed
Fix lint
1 parent fb310ff commit 933b9ec

4 files changed

Lines changed: 9 additions & 8 deletions

File tree

HISTORY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Our backwards-compatibility policy can be found [here](https://github.com/python
1616
- **Potentially breaking**: Sequences are now structured into tuples.
1717
This allows hashability, better immutability and is more consistent with the [`collections.abc.Sequence`](https://docs.python.org/3/library/collections.abc.html#collections.abc.Sequence) type.
1818
See [Migrations](https://catt.rs/en/latest/migrations.html#sequences-structuring-into-tuples) for steps to restore legacy behavior.
19+
([#663](https://github.com/python-attrs/cattrs/pull/663))
1920
- Add a `use_alias` parameter to {class}`cattrs.Converter`.
2021
{func}`cattrs.gen.make_dict_unstructure_fn_from_attrs`, {func}`cattrs.gen.make_dict_unstructure_fn`,
2122
{func}`cattrs.gen.make_dict_structure_fn_from_attrs`, {func}`cattrs.gen.make_dict_structure_fn`

src/cattrs/cols.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
is_bare,
2525
is_frozenset,
2626
is_mapping,
27-
is_sequence,
2827
is_mutable_sequence,
28+
is_sequence,
2929
is_subclass,
3030
)
3131
from ._compat import is_mutable_set as is_set
@@ -48,17 +48,17 @@
4848

4949
__all__ = [
5050
"defaultdict_structure_factory",
51+
"homogenous_tuple_structure_factory",
5152
"is_any_set",
5253
"is_defaultdict",
5354
"is_frozenset",
5455
"is_mapping",
55-
"is_namedtuple",
5656
"is_mutable_sequence",
57+
"is_namedtuple",
5758
"is_sequence",
5859
"is_set",
5960
"iterable_unstructure_factory",
6061
"list_structure_factory",
61-
"homogenous_tuple_structure_factory",
6262
"mapping_structure_factory",
6363
"mapping_unstructure_factory",
6464
"namedtuple_dict_structure_factory",

src/cattrs/converters.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,27 +43,27 @@
4343
is_hetero_tuple,
4444
is_literal,
4545
is_mapping,
46+
is_mutable_sequence,
4647
is_mutable_set,
4748
is_optional,
4849
is_protocol,
4950
is_tuple,
5051
is_typeddict,
5152
is_union_type,
5253
signature,
53-
is_mutable_sequence,
5454
)
5555
from .cols import (
5656
defaultdict_structure_factory,
57+
homogenous_tuple_structure_factory,
5758
is_defaultdict,
5859
is_namedtuple,
60+
is_sequence,
5961
iterable_unstructure_factory,
6062
list_structure_factory,
61-
homogenous_tuple_structure_factory,
6263
mapping_structure_factory,
6364
mapping_unstructure_factory,
6465
namedtuple_structure_factory,
6566
namedtuple_unstructure_factory,
66-
is_sequence,
6767
)
6868
from .disambiguators import create_default_dis_func, is_supported_union
6969
from .dispatch import (

tests/test_cols.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
from cattrs._compat import FrozenSet
1010
from cattrs.cols import (
1111
is_any_set,
12-
iterable_unstructure_factory,
13-
mapping_unstructure_factory,
1412
is_sequence,
13+
iterable_unstructure_factory,
1514
list_structure_factory,
15+
mapping_unstructure_factory,
1616
)
1717

1818
from ._compat import is_py310_plus

0 commit comments

Comments
 (0)