Skip to content

Commit 72990b1

Browse files
author
rocky
committed
Lint: unused imports and correct annotation type
1 parent 457c2a9 commit 72990b1

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

xdis/codetype/code311.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# (C) Copyright 2020-2021, 2023 by Rocky Bernstein
1+
# (C) Copyright 2020-2021, 2023-2024 by Rocky Bernstein
22
#
33
# This program is free software; you can redistribute it and/or
44
# modify it under the terms of the GNU General Public License
@@ -16,13 +16,12 @@
1616

1717
import types
1818
from copy import deepcopy
19+
from dataclasses import dataclass
20+
from typing import Iterable, Iterator, Optional
1921

2022
from xdis.codetype.code310 import Code310, Code310FieldTypes
2123
from xdis.version_info import PYTHON_VERSION_TRIPLE, version_tuple_to_str
2224

23-
from dataclasses import dataclass
24-
from typing import Iterable, Iterator, Generator
25-
2625

2726
def parse_location_entries(location_bytes, first_line):
2827
"""
@@ -227,7 +226,7 @@ def _test_check_bit(linetable_code_byte: int):
227226
return bool(linetable_code_byte & 128)
228227

229228

230-
def _go_to_next_code_byte(remaining_linetable: Iterator[int]) -> int:
229+
def _go_to_next_code_byte(remaining_linetable: Iterator[int]) -> Optional[int]:
231230
try:
232231
while not _test_check_bit((code_byte := next(remaining_linetable))):
233232
pass

0 commit comments

Comments
 (0)