---
source: crates/ruff_linter/src/rules/pyupgrade/mod.rs
---
UP035.py:2:1: UP035 [*] Import from `collections.abc` instead: `Mapping`
  |
1 | # UP035
2 | from collections import Mapping
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UP035
3 | 
4 | from collections import Mapping as MAP
  |
  = help: Import from `collections.abc`

ℹ Safe fix
1 1 | # UP035
2   |-from collections import Mapping
  2 |+from collections.abc import Mapping
3 3 | 
4 4 | from collections import Mapping as MAP
5 5 | 

UP035.py:4:1: UP035 [*] Import from `collections.abc` instead: `Mapping`
  |
2 | from collections import Mapping
3 | 
4 | from collections import Mapping as MAP
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UP035
5 | 
6 | from collections import Mapping, Sequence
  |
  = help: Import from `collections.abc`

ℹ Safe fix
1 1 | # UP035
2 2 | from collections import Mapping
3 3 | 
4   |-from collections import Mapping as MAP
  4 |+from collections.abc import Mapping as MAP
5 5 | 
6 6 | from collections import Mapping, Sequence
7 7 | 

UP035.py:6:1: UP035 [*] Import from `collections.abc` instead: `Mapping`, `Sequence`
  |
4 | from collections import Mapping as MAP
5 | 
6 | from collections import Mapping, Sequence
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UP035
7 | 
8 | from collections import Counter, Mapping
  |
  = help: Import from `collections.abc`

ℹ Safe fix
3 3 | 
4 4 | from collections import Mapping as MAP
5 5 | 
6   |-from collections import Mapping, Sequence
  6 |+from collections.abc import Mapping, Sequence
7 7 | 
8 8 | from collections import Counter, Mapping
9 9 | 

UP035.py:8:1: UP035 [*] Import from `collections.abc` instead: `Mapping`
   |
 6 | from collections import Mapping, Sequence
 7 | 
 8 | from collections import Counter, Mapping
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UP035
 9 | 
10 | from collections import (Counter, Mapping)
   |
   = help: Import from `collections.abc`

ℹ Safe fix
5  5  | 
6  6  | from collections import Mapping, Sequence
7  7  | 
8     |-from collections import Counter, Mapping
   8  |+from collections import Counter
   9  |+from collections.abc import Mapping
9  10 | 
10 11 | from collections import (Counter, Mapping)
11 12 | 

UP035.py:10:1: UP035 [*] Import from `collections.abc` instead: `Mapping`
   |
 8 | from collections import Counter, Mapping
 9 | 
10 | from collections import (Counter, Mapping)
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UP035
11 | 
12 | from collections import (Counter,
   |
   = help: Import from `collections.abc`

ℹ Safe fix
7  7  | 
8  8  | from collections import Counter, Mapping
9  9  | 
10    |-from collections import (Counter, Mapping)
   10 |+from collections import (Counter)
   11 |+from collections.abc import Mapping
11 12 | 
12 13 | from collections import (Counter,
13 14 |                          Mapping)

UP035.py:12:1: UP035 [*] Import from `collections.abc` instead: `Mapping`
   |
10 |   from collections import (Counter, Mapping)
11 |   
12 | / from collections import (Counter,
13 | |                          Mapping)
   | |_________________________________^ UP035
14 |   
15 |   from collections import Counter, \
   |
   = help: Import from `collections.abc`

ℹ Safe fix
9  9  | 
10 10 | from collections import (Counter, Mapping)
11 11 | 
12    |-from collections import (Counter,
13    |-                         Mapping)
   12 |+from collections import (Counter)
   13 |+from collections.abc import Mapping
14 14 | 
15 15 | from collections import Counter, \
16 16 |                          Mapping

UP035.py:15:1: UP035 [*] Import from `collections.abc` instead: `Mapping`
   |
13 |                            Mapping)
14 |   
15 | / from collections import Counter, \
16 | |                          Mapping
   | |________________________________^ UP035
17 |   
18 |   from collections import Counter, Mapping, Sequence
   |
   = help: Import from `collections.abc`

ℹ Safe fix
12 12 | from collections import (Counter,
13 13 |                          Mapping)
14 14 | 
15    |-from collections import Counter, \
16    |-                         Mapping
   15 |+from collections import Counter
   16 |+from collections.abc import Mapping
17 17 | 
18 18 | from collections import Counter, Mapping, Sequence
19 19 | 

UP035.py:18:1: UP035 [*] Import from `collections.abc` instead: `Mapping`, `Sequence`
   |
16 |                          Mapping
17 | 
18 | from collections import Counter, Mapping, Sequence
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UP035
19 | 
20 | from collections import Mapping as mapping, Counter
   |
   = help: Import from `collections.abc`

ℹ Safe fix
15 15 | from collections import Counter, \
16 16 |                          Mapping
17 17 | 
18    |-from collections import Counter, Mapping, Sequence
   18 |+from collections import Counter
   19 |+from collections.abc import Mapping, Sequence
19 20 | 
20 21 | from collections import Mapping as mapping, Counter
21 22 | 

UP035.py:20:1: UP035 [*] Import from `collections.abc` instead: `Mapping`
   |
18 | from collections import Counter, Mapping, Sequence
19 | 
20 | from collections import Mapping as mapping, Counter
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UP035
21 | 
22 | if True:
   |
   = help: Import from `collections.abc`

ℹ Safe fix
17 17 | 
18 18 | from collections import Counter, Mapping, Sequence
19 19 | 
20    |-from collections import Mapping as mapping, Counter
   20 |+from collections import Counter
   21 |+from collections.abc import Mapping as mapping
21 22 | 
22 23 | if True:
23 24 |     from collections import Mapping, Counter

UP035.py:23:5: UP035 [*] Import from `collections.abc` instead: `Mapping`
   |
22 | if True:
23 |     from collections import Mapping, Counter
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UP035
24 | 
25 | if True:
   |
   = help: Import from `collections.abc`

ℹ Safe fix
20 20 | from collections import Mapping as mapping, Counter
21 21 | 
22 22 | if True:
23    |-    from collections import Mapping, Counter
   23 |+    from collections import Counter
   24 |+    from collections.abc import Mapping
24 25 | 
25 26 | if True:
26 27 |     if True:

UP035.py:28:5: UP035 [*] Import from `collections.abc` instead: `Mapping`
   |
26 |     if True:
27 |         pass
28 |     from collections import Mapping, Counter
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UP035
29 | 
30 | if True: from collections import Mapping
   |
   = help: Import from `collections.abc`

ℹ Safe fix
25 25 | if True:
26 26 |     if True:
27 27 |         pass
28    |-    from collections import Mapping, Counter
   28 |+    from collections import Counter
   29 |+    from collections.abc import Mapping
29 30 | 
30 31 | if True: from collections import Mapping
31 32 | 

UP035.py:30:10: UP035 [*] Import from `collections.abc` instead: `Mapping`
   |
28 |     from collections import Mapping, Counter
29 | 
30 | if True: from collections import Mapping
   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UP035
31 | 
32 | import os
   |
   = help: Import from `collections.abc`

ℹ Safe fix
27 27 |         pass
28 28 |     from collections import Mapping, Counter
29 29 | 
30    |-if True: from collections import Mapping
   30 |+if True: from collections.abc import Mapping
31 31 | 
32 32 | import os
33 33 | from collections import Counter, Mapping

UP035.py:33:1: UP035 [*] Import from `collections.abc` instead: `Mapping`
   |
32 | import os
33 | from collections import Counter, Mapping
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UP035
34 | import sys
   |
   = help: Import from `collections.abc`

ℹ Safe fix
30 30 | if True: from collections import Mapping
31 31 | 
32 32 | import os
33    |-from collections import Counter, Mapping
   33 |+from collections import Counter
   34 |+from collections.abc import Mapping
34 35 | import sys
35 36 | 
36 37 | if True:

UP035.py:37:5: UP035 [*] Import from `collections.abc` instead: `Mapping`, `Callable`
   |
36 |   if True:
37 |       from collections import (
   |  _____^
38 | |         Mapping,
39 | |         Callable,
40 | |         Bad,
41 | |         Good,
42 | |     )
   | |_____^ UP035
43 |   
44 |   from typing import Callable, Match, Pattern, List, OrderedDict, AbstractSet, ContextManager
   |
   = help: Import from `collections.abc`

ℹ Safe fix
35 35 | 
36 36 | if True:
37 37 |     from collections import (
38    |-        Mapping,
39    |-        Callable,
40 38 |         Bad,
41 39 |         Good,
42 40 |     )
   41 |+    from collections.abc import Mapping, Callable
43 42 | 
44 43 | from typing import Callable, Match, Pattern, List, OrderedDict, AbstractSet, ContextManager
45 44 | 

UP035.py:44:1: UP035 [*] Import from `collections.abc` instead: `Callable`
   |
42 |     )
43 | 
44 | from typing import Callable, Match, Pattern, List, OrderedDict, AbstractSet, ContextManager
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UP035
45 | 
46 | if True: from collections import (
   |
   = help: Import from `collections.abc`

ℹ Safe fix
41 41 |         Good,
42 42 |     )
43 43 | 
44    |-from typing import Callable, Match, Pattern, List, OrderedDict, AbstractSet, ContextManager
   44 |+from typing import Match, Pattern, List, OrderedDict, AbstractSet, ContextManager
   45 |+from collections.abc import Callable
45 46 | 
46 47 | if True: from collections import (
47 48 |     Mapping, Counter)

UP035.py:44:1: UP035 [*] Import from `collections` instead: `OrderedDict`
   |
42 |     )
43 | 
44 | from typing import Callable, Match, Pattern, List, OrderedDict, AbstractSet, ContextManager
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UP035
45 | 
46 | if True: from collections import (
   |
   = help: Import from `collections`

ℹ Safe fix
41 41 |         Good,
42 42 |     )
43 43 | 
44    |-from typing import Callable, Match, Pattern, List, OrderedDict, AbstractSet, ContextManager
   44 |+from typing import Callable, Match, Pattern, List, AbstractSet, ContextManager
   45 |+from collections import OrderedDict
45 46 | 
46 47 | if True: from collections import (
47 48 |     Mapping, Counter)

UP035.py:44:1: UP035 [*] Import from `re` instead: `Match`, `Pattern`
   |
42 |     )
43 | 
44 | from typing import Callable, Match, Pattern, List, OrderedDict, AbstractSet, ContextManager
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UP035
45 | 
46 | if True: from collections import (
   |
   = help: Import from `re`

ℹ Safe fix
41 41 |         Good,
42 42 |     )
43 43 | 
44    |-from typing import Callable, Match, Pattern, List, OrderedDict, AbstractSet, ContextManager
   44 |+from typing import Callable, List, OrderedDict, AbstractSet, ContextManager
   45 |+from re import Match, Pattern
45 46 | 
46 47 | if True: from collections import (
47 48 |     Mapping, Counter)

UP035.py:44:1: UP035 `typing.List` is deprecated, use `list` instead
   |
42 |     )
43 | 
44 | from typing import Callable, Match, Pattern, List, OrderedDict, AbstractSet, ContextManager
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UP035
45 | 
46 | if True: from collections import (
   |

UP035.py:44:1: UP035 `typing.AbstractSet` is deprecated, use `collections.abc.Set` instead
   |
42 |     )
43 | 
44 | from typing import Callable, Match, Pattern, List, OrderedDict, AbstractSet, ContextManager
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UP035
45 | 
46 | if True: from collections import (
   |

UP035.py:44:1: UP035 `typing.ContextManager` is deprecated, use `contextlib.AbstractContextManager` instead
   |
42 |     )
43 | 
44 | from typing import Callable, Match, Pattern, List, OrderedDict, AbstractSet, ContextManager
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UP035
45 | 
46 | if True: from collections import (
   |

UP035.py:46:10: UP035 Import from `collections.abc` instead: `Mapping`
   |
44 |   from typing import Callable, Match, Pattern, List, OrderedDict, AbstractSet, ContextManager
45 |   
46 |   if True: from collections import (
   |  __________^
47 | |     Mapping, Counter)
   | |_____________________^ UP035
48 |   
49 |   # Bad imports from PYI027 that are now handled by PYI022 (UP035)
   |
   = help: Import from `collections.abc`

UP035.py:50:1: UP035 `typing.ContextManager` is deprecated, use `contextlib.AbstractContextManager` instead
   |
49 | # Bad imports from PYI027 that are now handled by PYI022 (UP035)
50 | from typing import ContextManager
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UP035
51 | from typing import OrderedDict
52 | from typing_extensions import OrderedDict
   |

UP035.py:51:1: UP035 [*] Import from `collections` instead: `OrderedDict`
   |
49 | # Bad imports from PYI027 that are now handled by PYI022 (UP035)
50 | from typing import ContextManager
51 | from typing import OrderedDict
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UP035
52 | from typing_extensions import OrderedDict
53 | from typing import Callable
   |
   = help: Import from `collections`

ℹ Safe fix
48 48 | 
49 49 | # Bad imports from PYI027 that are now handled by PYI022 (UP035)
50 50 | from typing import ContextManager
51    |-from typing import OrderedDict
   51 |+from collections import OrderedDict
52 52 | from typing_extensions import OrderedDict
53 53 | from typing import Callable
54 54 | from typing import ByteString

UP035.py:52:1: UP035 [*] Import from `typing` instead: `OrderedDict`
   |
50 | from typing import ContextManager
51 | from typing import OrderedDict
52 | from typing_extensions import OrderedDict
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UP035
53 | from typing import Callable
54 | from typing import ByteString
   |
   = help: Import from `typing`

ℹ Safe fix
49 49 | # Bad imports from PYI027 that are now handled by PYI022 (UP035)
50 50 | from typing import ContextManager
51 51 | from typing import OrderedDict
52    |-from typing_extensions import OrderedDict
   52 |+from typing import OrderedDict
53 53 | from typing import Callable
54 54 | from typing import ByteString
55 55 | from typing import Container

UP035.py:53:1: UP035 [*] Import from `collections.abc` instead: `Callable`
   |
51 | from typing import OrderedDict
52 | from typing_extensions import OrderedDict
53 | from typing import Callable
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ UP035
54 | from typing import ByteString
55 | from typing import Container
   |
   = help: Import from `collections.abc`

ℹ Safe fix
50 50 | from typing import ContextManager
51 51 | from typing import OrderedDict
52 52 | from typing_extensions import OrderedDict
53    |-from typing import Callable
   53 |+from collections.abc import Callable
54 54 | from typing import ByteString
55 55 | from typing import Container
56 56 | from typing import Hashable

UP035.py:54:1: UP035 [*] Import from `collections.abc` instead: `ByteString`
   |
52 | from typing_extensions import OrderedDict
53 | from typing import Callable
54 | from typing import ByteString
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UP035
55 | from typing import Container
56 | from typing import Hashable
   |
   = help: Import from `collections.abc`

ℹ Safe fix
51 51 | from typing import OrderedDict
52 52 | from typing_extensions import OrderedDict
53 53 | from typing import Callable
54    |-from typing import ByteString
   54 |+from collections.abc import ByteString
55 55 | from typing import Container
56 56 | from typing import Hashable
57 57 | from typing import ItemsView

UP035.py:55:1: UP035 [*] Import from `collections.abc` instead: `Container`
   |
53 | from typing import Callable
54 | from typing import ByteString
55 | from typing import Container
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UP035
56 | from typing import Hashable
57 | from typing import ItemsView
   |
   = help: Import from `collections.abc`

ℹ Safe fix
52 52 | from typing_extensions import OrderedDict
53 53 | from typing import Callable
54 54 | from typing import ByteString
55    |-from typing import Container
   55 |+from collections.abc import Container
56 56 | from typing import Hashable
57 57 | from typing import ItemsView
58 58 | from typing import Iterable

UP035.py:56:1: UP035 [*] Import from `collections.abc` instead: `Hashable`
   |
54 | from typing import ByteString
55 | from typing import Container
56 | from typing import Hashable
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ UP035
57 | from typing import ItemsView
58 | from typing import Iterable
   |
   = help: Import from `collections.abc`

ℹ Safe fix
53 53 | from typing import Callable
54 54 | from typing import ByteString
55 55 | from typing import Container
56    |-from typing import Hashable
   56 |+from collections.abc import Hashable
57 57 | from typing import ItemsView
58 58 | from typing import Iterable
59 59 | from typing import Iterator

UP035.py:57:1: UP035 [*] Import from `collections.abc` instead: `ItemsView`
   |
55 | from typing import Container
56 | from typing import Hashable
57 | from typing import ItemsView
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UP035
58 | from typing import Iterable
59 | from typing import Iterator
   |
   = help: Import from `collections.abc`

ℹ Safe fix
54 54 | from typing import ByteString
55 55 | from typing import Container
56 56 | from typing import Hashable
57    |-from typing import ItemsView
   57 |+from collections.abc import ItemsView
58 58 | from typing import Iterable
59 59 | from typing import Iterator
60 60 | from typing import KeysView

UP035.py:58:1: UP035 [*] Import from `collections.abc` instead: `Iterable`
   |
56 | from typing import Hashable
57 | from typing import ItemsView
58 | from typing import Iterable
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ UP035
59 | from typing import Iterator
60 | from typing import KeysView
   |
   = help: Import from `collections.abc`

ℹ Safe fix
55 55 | from typing import Container
56 56 | from typing import Hashable
57 57 | from typing import ItemsView
58    |-from typing import Iterable
   58 |+from collections.abc import Iterable
59 59 | from typing import Iterator
60 60 | from typing import KeysView
61 61 | from typing import Mapping

UP035.py:59:1: UP035 [*] Import from `collections.abc` instead: `Iterator`
   |
57 | from typing import ItemsView
58 | from typing import Iterable
59 | from typing import Iterator
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ UP035
60 | from typing import KeysView
61 | from typing import Mapping
   |
   = help: Import from `collections.abc`

ℹ Safe fix
56 56 | from typing import Hashable
57 57 | from typing import ItemsView
58 58 | from typing import Iterable
59    |-from typing import Iterator
   59 |+from collections.abc import Iterator
60 60 | from typing import KeysView
61 61 | from typing import Mapping
62 62 | from typing import MappingView

UP035.py:60:1: UP035 [*] Import from `collections.abc` instead: `KeysView`
   |
58 | from typing import Iterable
59 | from typing import Iterator
60 | from typing import KeysView
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ UP035
61 | from typing import Mapping
62 | from typing import MappingView
   |
   = help: Import from `collections.abc`

ℹ Safe fix
57 57 | from typing import ItemsView
58 58 | from typing import Iterable
59 59 | from typing import Iterator
60    |-from typing import KeysView
   60 |+from collections.abc import KeysView
61 61 | from typing import Mapping
62 62 | from typing import MappingView
63 63 | from typing import MutableMapping

UP035.py:61:1: UP035 [*] Import from `collections.abc` instead: `Mapping`
   |
59 | from typing import Iterator
60 | from typing import KeysView
61 | from typing import Mapping
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^ UP035
62 | from typing import MappingView
63 | from typing import MutableMapping
   |
   = help: Import from `collections.abc`

ℹ Safe fix
58 58 | from typing import Iterable
59 59 | from typing import Iterator
60 60 | from typing import KeysView
61    |-from typing import Mapping
   61 |+from collections.abc import Mapping
62 62 | from typing import MappingView
63 63 | from typing import MutableMapping
64 64 | from typing import MutableSequence

UP035.py:62:1: UP035 [*] Import from `collections.abc` instead: `MappingView`
   |
60 | from typing import KeysView
61 | from typing import Mapping
62 | from typing import MappingView
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UP035
63 | from typing import MutableMapping
64 | from typing import MutableSequence
   |
   = help: Import from `collections.abc`

ℹ Safe fix
59 59 | from typing import Iterator
60 60 | from typing import KeysView
61 61 | from typing import Mapping
62    |-from typing import MappingView
   62 |+from collections.abc import MappingView
63 63 | from typing import MutableMapping
64 64 | from typing import MutableSequence
65 65 | from typing import MutableSet

UP035.py:63:1: UP035 [*] Import from `collections.abc` instead: `MutableMapping`
   |
61 | from typing import Mapping
62 | from typing import MappingView
63 | from typing import MutableMapping
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UP035
64 | from typing import MutableSequence
65 | from typing import MutableSet
   |
   = help: Import from `collections.abc`

ℹ Safe fix
60 60 | from typing import KeysView
61 61 | from typing import Mapping
62 62 | from typing import MappingView
63    |-from typing import MutableMapping
   63 |+from collections.abc import MutableMapping
64 64 | from typing import MutableSequence
65 65 | from typing import MutableSet
66 66 | from typing import Sequence

UP035.py:64:1: UP035 [*] Import from `collections.abc` instead: `MutableSequence`
   |
62 | from typing import MappingView
63 | from typing import MutableMapping
64 | from typing import MutableSequence
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UP035
65 | from typing import MutableSet
66 | from typing import Sequence
   |
   = help: Import from `collections.abc`

ℹ Safe fix
61 61 | from typing import Mapping
62 62 | from typing import MappingView
63 63 | from typing import MutableMapping
64    |-from typing import MutableSequence
   64 |+from collections.abc import MutableSequence
65 65 | from typing import MutableSet
66 66 | from typing import Sequence
67 67 | from typing import Sized

UP035.py:65:1: UP035 [*] Import from `collections.abc` instead: `MutableSet`
   |
63 | from typing import MutableMapping
64 | from typing import MutableSequence
65 | from typing import MutableSet
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UP035
66 | from typing import Sequence
67 | from typing import Sized
   |
   = help: Import from `collections.abc`

ℹ Safe fix
62 62 | from typing import MappingView
63 63 | from typing import MutableMapping
64 64 | from typing import MutableSequence
65    |-from typing import MutableSet
   65 |+from collections.abc import MutableSet
66 66 | from typing import Sequence
67 67 | from typing import Sized
68 68 | from typing import ValuesView

UP035.py:66:1: UP035 [*] Import from `collections.abc` instead: `Sequence`
   |
64 | from typing import MutableSequence
65 | from typing import MutableSet
66 | from typing import Sequence
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ UP035
67 | from typing import Sized
68 | from typing import ValuesView
   |
   = help: Import from `collections.abc`

ℹ Safe fix
63 63 | from typing import MutableMapping
64 64 | from typing import MutableSequence
65 65 | from typing import MutableSet
66    |-from typing import Sequence
   66 |+from collections.abc import Sequence
67 67 | from typing import Sized
68 68 | from typing import ValuesView
69 69 | from typing import Awaitable

UP035.py:67:1: UP035 [*] Import from `collections.abc` instead: `Sized`
   |
65 | from typing import MutableSet
66 | from typing import Sequence
67 | from typing import Sized
   | ^^^^^^^^^^^^^^^^^^^^^^^^ UP035
68 | from typing import ValuesView
69 | from typing import Awaitable
   |
   = help: Import from `collections.abc`

ℹ Safe fix
64 64 | from typing import MutableSequence
65 65 | from typing import MutableSet
66 66 | from typing import Sequence
67    |-from typing import Sized
   67 |+from collections.abc import Sized
68 68 | from typing import ValuesView
69 69 | from typing import Awaitable
70 70 | from typing import AsyncIterator

UP035.py:68:1: UP035 [*] Import from `collections.abc` instead: `ValuesView`
   |
66 | from typing import Sequence
67 | from typing import Sized
68 | from typing import ValuesView
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UP035
69 | from typing import Awaitable
70 | from typing import AsyncIterator
   |
   = help: Import from `collections.abc`

ℹ Safe fix
65 65 | from typing import MutableSet
66 66 | from typing import Sequence
67 67 | from typing import Sized
68    |-from typing import ValuesView
   68 |+from collections.abc import ValuesView
69 69 | from typing import Awaitable
70 70 | from typing import AsyncIterator
71 71 | from typing import AsyncIterable

UP035.py:69:1: UP035 [*] Import from `collections.abc` instead: `Awaitable`
   |
67 | from typing import Sized
68 | from typing import ValuesView
69 | from typing import Awaitable
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UP035
70 | from typing import AsyncIterator
71 | from typing import AsyncIterable
   |
   = help: Import from `collections.abc`

ℹ Safe fix
66 66 | from typing import Sequence
67 67 | from typing import Sized
68 68 | from typing import ValuesView
69    |-from typing import Awaitable
   69 |+from collections.abc import Awaitable
70 70 | from typing import AsyncIterator
71 71 | from typing import AsyncIterable
72 72 | from typing import Coroutine

UP035.py:70:1: UP035 [*] Import from `collections.abc` instead: `AsyncIterator`
   |
68 | from typing import ValuesView
69 | from typing import Awaitable
70 | from typing import AsyncIterator
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UP035
71 | from typing import AsyncIterable
72 | from typing import Coroutine
   |
   = help: Import from `collections.abc`

ℹ Safe fix
67 67 | from typing import Sized
68 68 | from typing import ValuesView
69 69 | from typing import Awaitable
70    |-from typing import AsyncIterator
   70 |+from collections.abc import AsyncIterator
71 71 | from typing import AsyncIterable
72 72 | from typing import Coroutine
73 73 | from typing import Collection

UP035.py:71:1: UP035 [*] Import from `collections.abc` instead: `AsyncIterable`
   |
69 | from typing import Awaitable
70 | from typing import AsyncIterator
71 | from typing import AsyncIterable
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UP035
72 | from typing import Coroutine
73 | from typing import Collection
   |
   = help: Import from `collections.abc`

ℹ Safe fix
68 68 | from typing import ValuesView
69 69 | from typing import Awaitable
70 70 | from typing import AsyncIterator
71    |-from typing import AsyncIterable
   71 |+from collections.abc import AsyncIterable
72 72 | from typing import Coroutine
73 73 | from typing import Collection
74 74 | from typing import AsyncGenerator

UP035.py:72:1: UP035 [*] Import from `collections.abc` instead: `Coroutine`
   |
70 | from typing import AsyncIterator
71 | from typing import AsyncIterable
72 | from typing import Coroutine
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UP035
73 | from typing import Collection
74 | from typing import AsyncGenerator
   |
   = help: Import from `collections.abc`

ℹ Safe fix
69 69 | from typing import Awaitable
70 70 | from typing import AsyncIterator
71 71 | from typing import AsyncIterable
72    |-from typing import Coroutine
   72 |+from collections.abc import Coroutine
73 73 | from typing import Collection
74 74 | from typing import AsyncGenerator
75 75 | from typing import Reversible

UP035.py:73:1: UP035 [*] Import from `collections.abc` instead: `Collection`
   |
71 | from typing import AsyncIterable
72 | from typing import Coroutine
73 | from typing import Collection
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UP035
74 | from typing import AsyncGenerator
75 | from typing import Reversible
   |
   = help: Import from `collections.abc`

ℹ Safe fix
70 70 | from typing import AsyncIterator
71 71 | from typing import AsyncIterable
72 72 | from typing import Coroutine
73    |-from typing import Collection
   73 |+from collections.abc import Collection
74 74 | from typing import AsyncGenerator
75 75 | from typing import Reversible
76 76 | from typing import Generator

UP035.py:74:1: UP035 [*] Import from `collections.abc` instead: `AsyncGenerator`
   |
72 | from typing import Coroutine
73 | from typing import Collection
74 | from typing import AsyncGenerator
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UP035
75 | from typing import Reversible
76 | from typing import Generator
   |
   = help: Import from `collections.abc`

ℹ Safe fix
71 71 | from typing import AsyncIterable
72 72 | from typing import Coroutine
73 73 | from typing import Collection
74    |-from typing import AsyncGenerator
   74 |+from collections.abc import AsyncGenerator
75 75 | from typing import Reversible
76 76 | from typing import Generator
77 77 | from typing import Callable

UP035.py:75:1: UP035 [*] Import from `collections.abc` instead: `Reversible`
   |
73 | from typing import Collection
74 | from typing import AsyncGenerator
75 | from typing import Reversible
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UP035
76 | from typing import Generator
77 | from typing import Callable
   |
   = help: Import from `collections.abc`

ℹ Safe fix
72 72 | from typing import Coroutine
73 73 | from typing import Collection
74 74 | from typing import AsyncGenerator
75    |-from typing import Reversible
   75 |+from collections.abc import Reversible
76 76 | from typing import Generator
77 77 | from typing import Callable
78 78 | from typing import cast

UP035.py:76:1: UP035 [*] Import from `collections.abc` instead: `Generator`
   |
74 | from typing import AsyncGenerator
75 | from typing import Reversible
76 | from typing import Generator
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UP035
77 | from typing import Callable
78 | from typing import cast
   |
   = help: Import from `collections.abc`

ℹ Safe fix
73 73 | from typing import Collection
74 74 | from typing import AsyncGenerator
75 75 | from typing import Reversible
76    |-from typing import Generator
   76 |+from collections.abc import Generator
77 77 | from typing import Callable
78 78 | from typing import cast
79 79 | 

UP035.py:77:1: UP035 [*] Import from `collections.abc` instead: `Callable`
   |
75 | from typing import Reversible
76 | from typing import Generator
77 | from typing import Callable
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ UP035
78 | from typing import cast
   |
   = help: Import from `collections.abc`

ℹ Safe fix
74 74 | from typing import AsyncGenerator
75 75 | from typing import Reversible
76 76 | from typing import Generator
77    |-from typing import Callable
   77 |+from collections.abc import Callable
78 78 | from typing import cast
79 79 | 
80 80 | # OK

UP035.py:90:1: UP035 [*] Import from `typing` instead: `dataclass_transform`
   |
89 | # OK: `typing_extensions` supports `frozen_default` (backported from 3.12).
90 | from typing_extensions import dataclass_transform
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UP035
91 | 
92 | # UP035
   |
   = help: Import from `typing`

ℹ Safe fix
87 87 | from typing_extensions import NamedTuple
88 88 | 
89 89 | # OK: `typing_extensions` supports `frozen_default` (backported from 3.12).
90    |-from typing_extensions import dataclass_transform
   90 |+from typing import dataclass_transform
91 91 | 
92 92 | # UP035
93 93 | from backports.strenum import StrEnum

UP035.py:93:1: UP035 [*] Import from `enum` instead: `StrEnum`
   |
92 | # UP035
93 | from backports.strenum import StrEnum
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UP035
94 | 
95 | # UP035
   |
   = help: Import from `enum`

ℹ Safe fix
90 90 | from typing_extensions import dataclass_transform
91 91 | 
92 92 | # UP035
93    |-from backports.strenum import StrEnum
   93 |+from enum import StrEnum
94 94 | 
95 95 | # UP035
96 96 | from typing_extensions import override

UP035.py:96:1: UP035 [*] Import from `typing` instead: `override`
   |
95 | # UP035
96 | from typing_extensions import override
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UP035
97 | 
98 | # UP035
   |
   = help: Import from `typing`

ℹ Safe fix
93 93 | from backports.strenum import StrEnum
94 94 | 
95 95 | # UP035
96    |-from typing_extensions import override
   96 |+from typing import override
97 97 | 
98 98 | # UP035
99 99 | from typing_extensions import Buffer

UP035.py:99:1: UP035 [*] Import from `collections.abc` instead: `Buffer`
    |
 98 | # UP035
 99 | from typing_extensions import Buffer
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UP035
100 | 
101 | # UP035
    |
    = help: Import from `collections.abc`

ℹ Safe fix
96  96  | from typing_extensions import override
97  97  | 
98  98  | # UP035
99      |-from typing_extensions import Buffer
    99  |+from collections.abc import Buffer
100 100 | 
101 101 | # UP035
102 102 | from typing_extensions import get_original_bases

UP035.py:102:1: UP035 [*] Import from `types` instead: `get_original_bases`
    |
101 | # UP035
102 | from typing_extensions import get_original_bases
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UP035
    |
    = help: Import from `types`

ℹ Safe fix
99  99  | from typing_extensions import Buffer
100 100 | 
101 101 | # UP035
102     |-from typing_extensions import get_original_bases
    102 |+from types import get_original_bases


