Skip to content

Commit bc5e187

Browse files
committed
chore: replace legacy type comment in test_exceptions
mypy 2.0 (pulled in by the pre-commit autoupdate) rejects the old `browser = None # type: Zeroconf` form because None is not assignable to Zeroconf. Switch to a class-level annotation without an initializer; setUpClass assigns the real value before any test runs.
1 parent f2b1609 commit bc5e187

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tests/test_exceptions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def teardown_module():
2424

2525

2626
class Exceptions(unittest.TestCase):
27-
browser = None # type: Zeroconf
27+
browser: Zeroconf
2828

2929
@classmethod
3030
def setUpClass(cls):

0 commit comments

Comments
 (0)