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

new linter: Discover empty classes #739

atodorov opened this issue Jan 23, 2019 · 0 comments


None yet
1 participant
Copy link

commented Jan 23, 2019

There are classes which are essentially empty:

class MyClass:

the ones I've seen like NewCaseForm(XMLRPCNewCaseForm) are left-over artifacts from internal refactoring. They must be removed and the code must use the classes which actually do something (and rename them where it makes sense).

There could also be classes like this:

class OtherEmptyClass:
   'only docstring available'

A new kiwi_lint/ checker is needed to detect these.

Hint: astroid.Module.body will be empty in the later scenario and contain a Pass() child node in the first.

danibanani1 added a commit to danibanani1/Kiwi that referenced this issue May 27, 2019

@atodorov atodorov closed this in 5289694 May 28, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.