-
Notifications
You must be signed in to change notification settings - Fork 214
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
Unpin pylint version and fix some lint warnings #484
Conversation
pylint-dev/astroid#649 (comment)
I guess @leouieda pinned pylint for the same reason. |
d1c2c2b
to
9781ed4
Compare
Run v2.5.3 of pylint: `pylint --generate-rcfile > .pylintrc`, and then manually keeping some old PyGMT specific settings. E.g. jobs=4; max-module-lines=2000; max-args=10; max-attributes=10; good-names=i,j,k,ex,Run,_,w,e,s,n,x,y,z. Add back 'attribute-defined-outside-init' and 'bad-continuation' to the disable list, the latter is to fit in with black (see psf/black#48).
Allow importing certain modules outside of toplevel.
As suggested by Sourcery in https://github.com/weiji14/pygmt/pull/103/files#r444579519.
Please merge the master branch in and see if the CI pass (still 43 failures). |
See https://stackoverflow.com/a/61139278. Co-Authored-By: Dongdong Tian <seisman.info@gmail.com>
There is still one warning for me:
but I'm using pylint 2.4.4 |
So that both pylint 2.4.4 and 2.5.3 will be happy.
Description of proposed changes
Not sure why pylint was pinned to 2.2.2 in #383, but it's broken and we'll need to update to 2.3.0 or newer (see pylint-dev/astroid#649). Using 2.2.2 will give the following error:
Will also fix some lint warnings in this PR. I've refreshed the
.pylintrc
file for pylint v2.5.3 by running:and then manually kept some old PyGMT specific settings from earlier PRs (e.g. #73).
Also added back 'attribute-defined-outside-init' and 'bad-continuation' to the disable list, the latter is to fit in with black (see psf/black#48).
References:
Fixes #
Reminders
make format
andmake check
to make sure the code follows the style guide.doc/api/index.rst
.