Conversation
weiji14
left a comment
There was a problem hiding this comment.
Just one quick comment for now. I still need to find time to test this locally. Oh, and please remove the exclude .pylintrc line from MANIFEST.in!
| [DESIGN] | ||
|
|
||
| # Maximum number of arguments for function / method. | ||
| max-args=10 | ||
|
|
||
| # Maximum number of attributes for a class (see R0902). | ||
| max-attributes=10 | ||
|
|
||
| # Maximum number of boolean expressions in an if statement (see R0916). | ||
| max-bool-expr=5 | ||
|
|
||
| # Maximum number of branch for function / method body. | ||
| max-branches=12 | ||
|
|
||
| # Maximum number of locals for function / method body. | ||
| max-locals=15 | ||
|
|
||
| # Maximum number of parents for a class (see R0901). | ||
| max-parents=7 | ||
|
|
||
| # Maximum number of public methods for a class (see R0904). | ||
| max-public-methods=20 | ||
|
|
||
| # Maximum number of return / yield for function / method body. | ||
| max-returns=6 | ||
|
|
||
| # Maximum number of statements in function / method body. | ||
| max-statements=50 | ||
|
|
||
| # Minimum number of public methods for a class (see R0903). | ||
| min-public-methods=2 |
There was a problem hiding this comment.
Do we want to keep any more of these design choices? I think the max-attributes=10 is also a non-default choice according to #484. Feel like there are a few of these we should keep too even though we don't encounter it often.
There was a problem hiding this comment.
The default max-attributes=7 works well for the current main branch. Perhaps we should only change these values when we have to.
|
Ping @weiji14 and @meghanrjones for review. |
weiji14
left a comment
There was a problem hiding this comment.
Yep, looks good, no errors running make lint locally 🎉
…ingTools#1755) * Migrate pylint settings from .pylintrc to pyproject.toml * Disable import-error * Remove .pylintrc from MANIFEST.in * Remove .pylintrc from workflows * Set generated-members to pandas.* * Refactor test_hotspots to avoid E1101 error
Description of proposed changes
Changes in this PR:
.pylintrcpyproject.tomlimport-outside-toplevelandattribute-defined-outside-initjobsto 0 so that pylint can use all available cores (the old value is 4).Fixes #1740.
Reminders
make formatandmake checkto make sure the code follows the style guide.doc/api/index.rst.Slash Commands
You can write slash commands (
/command) in the first line of a comment to performspecific operations. Supported slash commands are:
/format: automatically format and lint the code/test-gmt-dev: run full tests on the latest GMT development version