Skip to content

Avoid duplicate overgeneral-exceptions warnings with --jobs #8702

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

Merged
merged 1 commit into from
May 19, 2023

Conversation

jacobtylerwalls
Copy link
Member

Type of Changes

Type
βœ“ πŸ› Bug fix

Description

This warning was emitted multiple times when running with --jobs, e.g. thousands of times (not just number of jobs).

It's a configuration sanity check: it belongs in the linter, not in the actual checker.

Closes #7774

@codecov
Copy link

codecov bot commented May 19, 2023

Codecov Report

Merging #8702 (58348a1) into main (7a562dd) will not change coverage.
The diff coverage is 75.00%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #8702   +/-   ##
=======================================
  Coverage   95.81%   95.81%           
=======================================
  Files         172      172           
  Lines       18320    18320           
=======================================
  Hits        17553    17553           
  Misses        767      767           
Impacted Files Coverage Ξ”
pylint/checkers/exceptions.py 98.25% <ΓΈ> (+0.39%) ⬆️
pylint/config/config_initialization.py 98.38% <75.00%> (-1.62%) ⬇️

@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 58348a1

Copy link
Collaborator

@DanielNoord DanielNoord left a comment

Choose a reason for hiding this comment

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

Ah, that is indeed a much better place. Should have thought about it when reviewing initially.

It did force me to fix this in my own projects to not have the spam πŸ˜„

@DanielNoord DanielNoord merged commit 9a2f113 into pylint-dev:main May 19, 2023
@@ -102,6 +103,19 @@ def _config_initialization(
"unrecognized-option", args=unrecognized_options_message, line=0
)

# TODO 3.1: Change this to emit unknown-option-value
Copy link
Member

@Pierre-Sassoulas Pierre-Sassoulas May 19, 2023

Choose a reason for hiding this comment

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

I think this need to be removed from pylint and moved to the config upgrader. Doing those kind of checks at runtime is costly and unnecessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

With --jobs 2, the open() call is executed for each opened file
3 participants