Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion tests/test_base_class_contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,9 @@ class itself*, so identity is what is asserted, not absence: the name
may exist, it just may not be the base.

"""
pending = tuple(rel.removesuffix('.py').replace('/', '.')
# Not ``str.removesuffix``: that is Python 3.9+, and the 3.8 leg runs
# this line as soon as the dict gains an entry. C.f. #1699.
pending = tuple((rel[:-len('.py')] if rel.endswith('.py') else rel).replace('/', '.')
for rel in PENDING_ALIAS_PATHS)

offenders = []
Expand Down
Loading