Skip to content

Commit 6ecfcfb

Browse files
committed
Make more linters not fight with each other.
pyright seems confused here, this should be fine without the staticmethod (but *with* an argument), which pyright made me remove, of course breaking the test... Time's up on figuring out why though.
1 parent 64f4048 commit 6ecfcfb

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

referencing/_attrs.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ class UnsupportedSubclassing(Exception):
2424
pass
2525

2626

27+
@staticmethod
2728
def _do_not_subclass() -> NoReturn: # pragma: no cover
2829
raise UnsupportedSubclassing(
2930
"Subclassing is not part of referencing's public API. "

referencing/tests/test_core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ def test_no_id(self, thing):
262262
[Registry, Resource, Specification],
263263
)
264264
def test_nonsubclassable(cls):
265-
with pytest.raises(Exception):
265+
with pytest.raises(Exception, match="(?i)subclassing"): # noqa: B017
266266

267267
class Boom(cls): # pragma: no cover
268268
pass

0 commit comments

Comments
 (0)