Skip to content

Commit dd969e4

Browse files
committed
Fix some ruff lint warnings
1 parent cf58852 commit dd969e4

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

barcode/codex.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
from __future__ import annotations
77

88
from typing import TYPE_CHECKING
9-
from typing import Collection
109
from typing import Literal
1110

1211
from barcode.base import Barcode
@@ -17,6 +16,8 @@
1716
from barcode.errors import NumberOfDigitsError
1817

1918
if TYPE_CHECKING:
19+
from collections.abc import Collection
20+
2021
from barcode.writer import BaseWriter
2122

2223
__docformat__ = "restructuredtext en"

barcode/writer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from barcode.version import version
1212

1313
if TYPE_CHECKING:
14-
from typing import Generator
14+
from collections.abc import Generator
1515
from typing import Literal
1616

1717
from PIL.Image import Image as T_Image

tests/test_manually.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
import codecs
55
import os
6-
from typing import Iterator
6+
from typing import TYPE_CHECKING
77

88
import pytest
99

@@ -12,6 +12,9 @@
1212
from barcode import version
1313
from barcode.writer import ImageWriter
1414

15+
if TYPE_CHECKING:
16+
from collections.abc import Iterator
17+
1518
PATH = os.path.dirname(os.path.abspath(__file__))
1619
TESTPATH = os.path.join(PATH, "test_outputs")
1720
HTMLFILE = os.path.join(TESTPATH, "index.html")

0 commit comments

Comments
 (0)