Skip to content

Commit 5af1731

Browse files
Apply ruff/pyupgrade rule UP035
UP035 Import from `collections.abc` instead UP035 Import from `re` instead
1 parent 0554c50 commit 5af1731

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

codespell_lib/_codespell.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,11 @@
2525
import re
2626
import sys
2727
import textwrap
28+
from collections.abc import Iterable, Sequence
29+
from re import Match, Pattern
2830
from typing import (
2931
Any,
30-
Iterable,
31-
Match,
3232
Optional,
33-
Pattern,
34-
Sequence,
3533
TextIO,
3634
)
3735

codespell_lib/tests/test_basic.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@
55
import re
66
import subprocess
77
import sys
8+
from collections.abc import Generator
89
from io import StringIO
910
from pathlib import Path
1011
from shutil import copyfile
11-
from typing import Any, Generator, Optional, Union
12+
from typing import Any, Optional, Union
1213
from unittest import mock
1314

1415
import pytest

codespell_lib/tests/test_dictionary.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
import os.path as op
44
import pathlib
55
import re
6-
from typing import Any, Iterable, Optional
6+
from collections.abc import Iterable
7+
from typing import Any, Optional
78

89
import pytest
910

0 commit comments

Comments
 (0)