Skip to content

Commit 024dcab

Browse files
committed
Fix some ruff lint warnings
1 parent 45bc47a commit 024dcab

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
@@ -4,7 +4,7 @@
44

55
import codecs
66
import os
7-
from typing import Iterator
7+
from typing import TYPE_CHECKING
88

99
import pytest
1010

@@ -13,6 +13,9 @@
1313
from barcode import version
1414
from barcode.writer import ImageWriter
1515

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

0 commit comments

Comments
 (0)