-
Notifications
You must be signed in to change notification settings - Fork 8
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
Check that attributes are defined #112
Comments
What would this look like? Something like this? class Foo:
__slots__ = ('a', 'b', 'c', 'd')
def __init__(self):
self.a = ...
self.b = ...
self.c = ...
# ERROR: slot 'd' is not used |
Exactly |
I can definitely see this being useful, although I can't think of a way to do this without some kind of static analysis. The decision to make it an import-time checker does give major advantages (#6). For now, I'll have to put this on hold -- if there is more interest that will bump priority |
Giving this some more thought:
|
Hi, i would like to ask for a small feature- a check that tests that attributes declared in slots are actually defined on the class.
The text was updated successfully, but these errors were encountered: