Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pdir: Python 3.13 #79

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions pdir/attr_category.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ def category_match(
'__excepthook__': (AttrCategory.SPECIAL_ATTRIBUTE, AttrCategory.PROPERTY),
'__mro__': (AttrCategory.SPECIAL_ATTRIBUTE, AttrCategory.PROPERTY),
'__subclasses__': (AttrCategory.SPECIAL_ATTRIBUTE, AttrCategory.FUNCTION),
'__static_attributes__': (AttrCategory.SPECIAL_ATTRIBUTE, AttrCategory.PROPERTY),
'__firstlineno__': (AttrCategory.SPECIAL_ATTRIBUTE, AttrCategory.PROPERTY),
'__next__': (AttrCategory.ITER, AttrCategory.FUNCTION),
'__enter__': (AttrCategory.CONTEXT_MANAGER, AttrCategory.FUNCTION),
'__exit__': (AttrCategory.CONTEXT_MANAGER, AttrCategory.FUNCTION),
Expand Down
4 changes: 4 additions & 0 deletions tests/test_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ def test_properties():
'__doc__',
'__module__',
'__weakref__',
'__static_attributes__',
'__firstlineno__',
],
)

Expand Down Expand Up @@ -115,6 +117,8 @@ def test_own():
'derived_instance_variable',
'__doc__',
'__module__',
'__static_attributes__',
'__firstlineno__',
],
)

Expand Down
4 changes: 3 additions & 1 deletion tests/test_pdir_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,10 @@ class A:
(
' \x1b[0;36m__class__\x1b[0m\x1b[1;30m, '
'\x1b[0m\x1b[0;36m__doc__\x1b[0m\x1b[1;30m, '
'\x1b[0m\x1b[0;36m__firstlineno__\x1b[0m\x1b[1;30m, '
'\x1b[0m\x1b[0;36m__module__\x1b[0m\x1b[1;30m, '
'\x1b[0m\x1b[0;36m__slots__\x1b[0m'
'\x1b[0m\x1b[0;36m__slots__\x1b[0m\x1b[1;30m, '
'\x1b[0m\x1b[0;36m__static_attributes__\x1b[0m'
),
'\x1b[0;33mabstract class:\x1b[0m',
' \x1b[0;36m__subclasshook__\x1b[0m',
Expand Down
4 changes: 4 additions & 0 deletions tests/test_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ class T:
result3, result4 = pdir(T).s('Attr'), pdir(T).search('Attr')
expected = '\n'.join(
[
'\x1b[0;33mspecial attribute:\x1b[0m',
(
' \x1b[0;36m__static_attributes__\x1b[0m'
),
'\x1b[0;33mattribute access:\x1b[0m',
(
' \x1b[0;36m__delattr__\x1b[0m\x1b[1;30m, '
Expand Down
Loading