File tree Expand file tree Collapse file tree 5 files changed +16
-14
lines changed Expand file tree Collapse file tree 5 files changed +16
-14
lines changed Original file line number Diff line number Diff line change 145
145
146
146
from __future__ import annotations
147
147
148
- # Do not import dataclasses; overhead is unacceptable (gh-117703)
149
-
150
- from collections .abc import Iterable , MutableMapping
151
- from collections import ChainMap as _ChainMap
152
148
import contextlib
153
149
import functools
154
- from .compat import io
155
150
import itertools
156
151
import os
157
152
import re
158
153
import sys
159
154
import types
155
+ from collections import ChainMap as _ChainMap
156
+
157
+ # Do not import dataclasses; overhead is unacceptable (gh-117703)
158
+ from collections .abc import Iterable , MutableMapping
159
+
160
+ from .compat import io
160
161
161
162
__all__ = (
162
163
"NoSectionError" ,
@@ -342,7 +343,7 @@ def combine(self, others):
342
343
return self
343
344
344
345
@staticmethod
345
- def _raise_all (exceptions : Iterable [' ParsingError' ]):
346
+ def _raise_all (exceptions : Iterable [ParsingError ]):
346
347
"""
347
348
Combine any number of ParsingErrors into one and raise it.
348
349
"""
Original file line number Diff line number Diff line change 1
- import types
2
1
import io as _io
2
+ import types
3
3
4
4
5
5
def text_encoding (encoding , stacklevel = 2 ): # pragma: no cover
Original file line number Diff line number Diff line change 1
- import test .support # type: ignore[import-untyped, unused-ignore, import-not-found]
2
1
import contextlib
2
+ import pathlib
3
3
import sys
4
4
import types
5
- import pathlib
5
+
6
+ import test .support # type: ignore[import-untyped, unused-ignore, import-not-found]
6
7
7
8
8
9
def check__all__ (* args , ** kwargs ):
Original file line number Diff line number Diff line change 1
1
import unittest
2
+
2
3
from backports import configparser
3
4
4
5
Original file line number Diff line number Diff line change 3
3
import os
4
4
import textwrap
5
5
import unittest
6
-
7
- from typing import Type , Iterable
8
-
9
- from .compat import support , os_helper
6
+ from collections .abc import Iterable
10
7
11
8
from backports import configparser
12
9
10
+ from .compat import os_helper , support
11
+
13
12
14
13
def nice_literals (str ):
15
14
"Remove b and u prefixes from reprs"
@@ -44,7 +43,7 @@ class CfgParserTestCaseClass:
44
43
comment_prefixes : Iterable [str ] = (';' , '#' )
45
44
inline_comment_prefixes : Iterable [str ] = (';' , '#' )
46
45
empty_lines_in_values = True
47
- dict_type : Type [collections .abc .Mapping ] = configparser ._default_dict
46
+ dict_type : type [collections .abc .Mapping ] = configparser ._default_dict
48
47
strict = False
49
48
default_section = configparser .DEFAULTSECT
50
49
interpolation = configparser ._UNSET
You can’t perform that action at this time.
0 commit comments