Skip to content

Commit

Permalink
Some casing of attributes per CPython version
Browse files Browse the repository at this point in the history
  • Loading branch information
A5rocks committed Jun 20, 2023
1 parent 5c689b6 commit 5a771fa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions trio/_tests/test_exports.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,14 +346,14 @@ def lookup_symbol(symbol):
if (
tool == "jedi"
and BaseException in class_.__mro__
and sys.version_info > (3, 11)
and sys.version_info >= (3, 11)
):
missing.remove("add_note")

if (
tool == "mypy"
and BaseException in class_.__mro__
and sys.version_info > (3, 10)
and sys.version_info >= (3, 11)
):
extra.remove("__notes__")

Expand Down Expand Up @@ -389,7 +389,7 @@ def lookup_symbol(symbol):
assert len(extra) == before - len(EXTRAS[class_])

# probably an issue with mypy....
if tool == "mypy" and class_ == trio.Path:
if tool == "mypy" and class_ == trio.Path and (3, 11, 4) > sys.version_info >= (3, 11):
before = len(missing)
missing -= {"owner", "group", "is_mount"}
assert len(missing) == before - 3
Expand All @@ -402,7 +402,7 @@ def lookup_symbol(symbol):

# I have not researched why these are missing, should maybe create an issue
# upstream with jedi
if tool == "jedi" and sys.version_info >= (3, 12):
if tool == "jedi" and sys.version_info >= (3, 11):
if class_ in (
trio.DTLSChannel,
trio.MemoryReceiveChannel,
Expand Down

0 comments on commit 5a771fa

Please sign in to comment.