Skip to content

Doesn't handle Meta well #50

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

Closed
dan-passaro opened this issue Aug 7, 2015 · 3 comments
Closed

Doesn't handle Meta well #50

dan-passaro opened this issue Aug 7, 2015 · 3 comments

Comments

@dan-passaro
Copy link

I have this Meta class in one of my models:

class Meta:
    unique_together = ('obj_1_id', 'obj_2_id', 'content_type')

This seemingly fine Meta class generates these errors using pylint and pylint-django:

$ pylint --rcfile /dev/null -r n --load-plugins pylint_django models.py
[...]
C: 40, 8: Missing class docstring (missing-docstring)
W: 40, 8: Class has no __init__ method (no-init)
C: 40, 8: Old-style class defined. (old-style-class)
R: 40, 8: Too few public methods (0/2) (too-few-public-methods)
W: 40, 8: Unused variable 'Meta' (unused-variable)

I have these versions:

pylint==1.4.3
pylint-django==0.6.1
pylint-plugin-utils==0.2.3
@vinnking
Copy link

Please refer to the article: https://blog.landscape.io/using-pylint-on-django-projects-with-pylint-django.html

@bittner
Copy link
Contributor

bittner commented Jan 14, 2017

I have the same problem: missing-docstring and too-few-public-methods is reported for the Meta class (of a Form subclass) in my case.

Interestingly, this is being handled by this plugin according to the source code. Not sure what is the problem here. Software versions I'm using:

Python==3.5.2
Django==1.10.4
astroid==1.4.9
pylint==1.6.4
pylint-django==0.7.2
tox==2.5.0

Is this maybe a problem with the Python and/or Django version I'm using? (Because I also have issues with Invalid constant name "urlpatterns", see issue #41).

@atodorov
Copy link
Contributor

Can't reproduce with the latest updates so closing. If you can reproduce open another issue with the code to reproduce.

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

4 participants