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

Emit a UserWarning and crash pylint if run in parallel and with custom plugin #7814

Closed
wants to merge 4 commits into from

Conversation

clavedeluna
Copy link
Collaborator

@clavedeluna clavedeluna commented Nov 21, 2022

Type of Changes

Type
βœ“ πŸ› Bug fix

Description

Closes #3232

As issue an as pylint docs, users should not run pylint in parallel AND with custom plugins.

Looks like this now:

/Users/xxx/pylint/pylint/lint/run.py:189: UserWarning: Running pylint in parallel with custom plugins is not currently supported.
  warnings.warn(

and pylint then stops execution

@clavedeluna
Copy link
Collaborator Author

So there are legitimate test cases to update so they don't run both in parallel and with plugins, good to know... if a maintainer πŸ‘οΈ this PR and thinks it's good, I'll update the tests.

@Pierre-Sassoulas
Copy link
Member

Isn't the conclusion in the issue's discussion that we should crash ?

"Running pylint in parallel with custom plugins is not currently supported.",
UserWarning,
)
sys.exit(32)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm Ok I'm not super convinced anymore after realizing that if you run
pylint test.py --enable=all --enable-all-extensions
on any test.py module raises this warning now...
which is prob because of --enable-all-extensions.

Maybe the code needs to be that config.jobs can be either 0 or anything >1? that would make more sense...

@clavedeluna
Copy link
Collaborator Author

clavedeluna commented Nov 21, 2022

Isn't the conclusion in the issue's discussion that we should crash ?

Yes, plus a warning if I understood correctly. I did that in the code but didn't properly say that in the title + PR description, will update it.

 sys.exit(32)

@clavedeluna clavedeluna changed the title Emit a UserWarning if pylint is run in parallel and with custom plugin Emit a UserWarning and crash pylint if run in parallel and with custom plugin Nov 21, 2022
Copy link
Member

@cdce8p cdce8p left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@coveralls
Copy link

coveralls commented Nov 23, 2022

Pull Request Test Coverage Report for Build 3568899284

  • 14 of 14 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.02%) to 95.457%

Totals Coverage Status
Change from base Build 3559949152: 0.02%
Covered Lines: 17606
Relevant Lines: 18444

πŸ’› - Coveralls

Copy link
Member

@Pierre-Sassoulas Pierre-Sassoulas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems 4 lines are not covered, would you mind adding a configuration functional tests, please ? (https://pylint.pycqa.org/en/latest/development_guide/contributor_guide/tests/writing_test.html#functional-tests-for-configurations)

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@clavedeluna clavedeluna added the Needs review πŸ” Needs to be reviewed by one or multiple more persons label Nov 25, 2022
Copy link
Member

@Pierre-Sassoulas Pierre-Sassoulas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ‘

Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
@github-actions
Copy link
Contributor

πŸ€– According to the primer, this change has no effect on the checked open source code. πŸ€–πŸŽ‰

This comment was generated for commit 8e623c4

@clavedeluna
Copy link
Collaborator Author

This should be ready to merge

@Pierre-Sassoulas
Copy link
Member

Let's wait for another maintainer review for this one.

@clavedeluna
Copy link
Collaborator Author

Closing since issue requirements have changed.

@clavedeluna clavedeluna closed this Dec 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs review πŸ” Needs to be reviewed by one or multiple more persons
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fail/warn on using parallel execution with custom plugins
4 participants