Skip to content

Commit 500ae24

Browse files
committed
👹 Feed the hobgoblins (delint).
1 parent 5f5b2e5 commit 500ae24

File tree

5 files changed

+16
-14
lines changed

5 files changed

+16
-14
lines changed

‎backports/configparser/__init__.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -145,18 +145,19 @@
145145

146146
from __future__ import annotations
147147

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
152148
import contextlib
153149
import functools
154-
from .compat import io
155150
import itertools
156151
import os
157152
import re
158153
import sys
159154
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
160161

161162
__all__ = (
162163
"NoSectionError",
@@ -342,7 +343,7 @@ def combine(self, others):
342343
return self
343344

344345
@staticmethod
345-
def _raise_all(exceptions: Iterable['ParsingError']):
346+
def _raise_all(exceptions: Iterable[ParsingError]):
346347
"""
347348
Combine any number of ParsingErrors into one and raise it.
348349
"""

‎backports/configparser/compat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import types
21
import io as _io
2+
import types
33

44

55
def text_encoding(encoding, stacklevel=2): # pragma: no cover

‎tests/compat.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
import test.support # type: ignore[import-untyped, unused-ignore, import-not-found]
21
import contextlib
2+
import pathlib
33
import sys
44
import types
5-
import pathlib
5+
6+
import test.support # type: ignore[import-untyped, unused-ignore, import-not-found]
67

78

89
def check__all__(*args, **kwargs):

‎tests/test_backport.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import unittest
2+
23
from backports import configparser
34

45

‎tests/test_configparser.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,12 @@
33
import os
44
import textwrap
55
import unittest
6-
7-
from typing import Type, Iterable
8-
9-
from .compat import support, os_helper
6+
from collections.abc import Iterable
107

118
from backports import configparser
129

10+
from .compat import os_helper, support
11+
1312

1413
def nice_literals(str):
1514
"Remove b and u prefixes from reprs"
@@ -44,7 +43,7 @@ class CfgParserTestCaseClass:
4443
comment_prefixes: Iterable[str] = (';', '#')
4544
inline_comment_prefixes: Iterable[str] = (';', '#')
4645
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
4847
strict = False
4948
default_section = configparser.DEFAULTSECT
5049
interpolation = configparser._UNSET

0 commit comments

Comments
 (0)