-
Notifications
You must be signed in to change notification settings - Fork 42
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
Switched from pycodestyle to pylint #174
Conversation
I think we should have a .pylintrc too. So we can configure pylint. Because pylint have lots of options of suggestions and stuff which might not be needed. |
What I propose is:
Benefit from doing this is:
|
I disabled these checks to get a 10 on 10 score for now.
|
#175
|
Sounds sensible. My preferred setup would be to rely on the standard configuration and not configuring it at all. But getting there will take time. Am I correct that we should be able to just delete the config file then and it will just use pylint defaults? |
@razzeee Running pylint with default config is possible and actually isn't a big task to achieve because there aren't many errors left, the most amounts of errors are about That being said I still think that running pylint on complete default isn't a good idea(at least in my opinion) because pylint gives quite a few suggestions of itself and sometime can have |
@razzeee it is possible and I am also suggesting that. As we progress with individual issues we will remove them one by one from disabled list. And once all these issues are solved we will be left with the default configuration. Its like we will be doing it in progressive way. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is the whole content from .pylintrc
comming form? If most of it is the default configuration, I don't get the point in explicitly specifying it in this repo.
Also it seems like you have disabled more checks then actually needed. Here pylint
succeeded with (only) 22 disabled checks.
@Rechi I just disabled these checks which was causing the build to fail.... I used the feature of pylint which creates pylintrc file. Everything except what I mentioned above is default. I used standard method of pylint to create it. We can remove all other things if we want to. |
This is now a more reasonable list, then you have in the current |
@Rechi for confirming.... Do you want me to make my own customized version of pylintrc file which includes only these errors which causes the build to fail. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exclude the mentioned files from the pylint check and remove the checks from the disabled list.
@Rechi I am sorry I guess I couldn't get what you exactly said here. I got it now, I will fix these. Sorry for making you do the extra work |
@Rechi Check this once and tell me if you see anything now. |
|
.pylintrc
Outdated
attribute-defined-outside-init, | ||
useless-object-inheritance, | ||
no-else-return, | ||
no-name-in-module, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not have to disable this check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is a problem with pylint when using virtual env. That's why it was showing this error in my pylint check. I am removing this for now from disabled list.
pylint-dev/pylint#1524
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although I don't like to disable no-name-in-module
and import-error
, I see the reason now in travis log.
Please readd it.
.pylintrc
Outdated
|
||
[MESSAGES CONTROL] | ||
|
||
disable=broad-except, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we break this up in two categories just visually.
disable=stuff-that-we-actually-want-ignored,
stuff-that-we-actually-want-ignored2,
stuff-thats-only-ignored-for-now-and-will-be-addressed-in-a-pr,
stuff-thats-only-ignored-for-now-and-will-be-addressed-in-a-pr2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@razzeee I think mostly all f them are ones which we are ignoring temporarily except import-error and no-name-in-module as It will cause build to fail due to virtual environment (as mentioned in pylint-dev/pylint#1524 )
#173
Note: It will not pass the build. We will have to correct it. I have created new issue for it. #175