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

Incorrect type reference in code. #111

Closed
Tonivalle opened this issue Nov 7, 2022 · 1 comment
Closed

Incorrect type reference in code. #111

Tonivalle opened this issue Nov 7, 2022 · 1 comment

Comments

@Tonivalle
Copy link

On the inspector.py file, inspect_staticmethod references classmethod in the last line of the function and inspect_classmethod references staticmethod, which should be reversed since every other function references the correct type when calling handle_function.

See snippet for the lines of code:

def inspect_staticmethod(self, node: ObjectNode) -> None:
"""Inspect a static method.
Parameters:
node: The node to inspect.
"""
self.handle_function(node, {"classmethod"})
def inspect_classmethod(self, node: ObjectNode) -> None:
"""Inspect a class method.
Parameters:
node: The node to inspect.
"""
self.handle_function(node, {"staticmethod"})

@pawamoy
Copy link
Member

pawamoy commented Nov 7, 2022

Ha, nice catch! Will push a fix, thanks 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants