8000 gh-119698: fix `symtable.Class.get_methods` and document its behaviour correctly by picnixz · Pull Request #120151 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-119698: fix symtable.Class.get_methods and document its behaviour correctly #120151

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

Merged
merged 24 commits into from
Jun 20, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fixup
  • Loading branch information
picnixz committed Jun 6, 8000 2024
commit 582906bf1fbad1417c034ade46d6fc3f3f83c5ec
12 changes: 6 additions & 6 deletions Lib/test/test_symtable.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,28 +58,28 @@ class GenericMine[T: int]:

class ComplexClass:
some_non_method_const = 1234

class some_non_method_nested: pass
type some_non_method_alias = int

some_non_method_genexpr = (x for x in [])
some_non_method_lambda = lambda x: x

def a_method(self): pass
@classmethod
def a_classmethod(cls): pass
@staticmethod
def a_staticmethod(): pass

# this one will be considered as a method because of the 'def' although
# it will *not* be a valid one at runtime since it is not a staticmethod.
def a_fakemethod(): pass

# check that those are still considered as methods
# since they are not using the 'global' keyword
def some_assigned_global_ident(): pass
def some_non_assigned_global_ident(): pass

# this one is not picked as a method because it will not even be
# visible by the class at runtime (this is equivalent to having
# that definition outside of the class).
Expand Down
0