pylint
pylint copied to clipboard
[trailing-comma-tuple] Fix enabling with message control locally when disabled for the file
Type of Changes
| Type | |
|---|---|
| ✓ | :bug: Bug fix |
Description
Refs #8606, https://github.com/pylint-dev/pylint/pull/9620 (follow-up) Closes #9608
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 95.84%. Comparing base (
ce47a62) to head (1eedcbb). Report is 162 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #9609 +/- ##
=======================================
Coverage 95.84% 95.84%
=======================================
Files 174 174
Lines 18897 18904 +7
=======================================
+ Hits 18112 18119 +7
Misses 785 785
| Files | Coverage Δ | |
|---|---|---|
| pylint/checkers/refactoring/refactoring_checker.py | 98.27% <100.00%> (+<0.01%) |
:arrow_up: |
| pylint/lint/message_state_handler.py | 96.48% <ø> (ø) |
🤖 According to the primer, this change has no effect on the checked open source code. 🤖🎉
This comment was generated for commit 6e4525884dd88edf9e89371a471c13f5393eede1
Jeez, I wonder why ruff don't have fine grained message control yet :smile: (I did not benchmark this yet, I probably need to test some assumptions about the caching of per line enable vs checking the enable on each token).
🤖 According to the primer, this change has no effect on the checked open source code. 🤖🎉
This comment was generated for commit d1ad751c804c1935791da8eb528a6e46dd27b7c5
🤖 Effect of this PR on checked open source code: 🤖
Effect on sentry: The following messages are no longer emitted:
- trailing-comma-tuple: Disallow trailing comma tuple https://github.com/getsentry/sentry/blob/5cb74afaa7bbd418bb76066326850890c8788a78/src/sentry/management/commands/create_sample_event.py#L10
- trailing-comma-tuple: Disallow trailing comma tuple https://github.com/getsentry/sentry/blob/5cb74afaa7bbd418bb76066326850890c8788a78/src/sentry/management/commands/create_sample_event.py#L11
- trailing-comma-tuple: Disallow trailing comma tuple https://github.com/getsentry/sentry/blob/5cb74afaa7bbd418bb76066326850890c8788a78/src/sentry/sentry_metrics/consumers/indexer/routing_producer.py#L152
This comment was generated for commit 42eff4362c5c04075457eb95f04ab7c35bd3b716
Wow, is_message_enabled is seriously misleading. I suggest we rename to is_message_enabled_for_current_file or create an argument for the file which default to current for 3.0 and to None in 4.0, what do you think @DanielNoord ?
🤖 According to the primer, this change has no effect on the checked open source code. 🤖🎉
This comment was generated for commit 0593953e19062b7e6c9c58aae6cf82f7008e80a5
Hmm, do we know if this actually meaningfully influences performance? Yes calling a function often is bad, but if the effect on performance is negligible than we might not want to overcomplicate our config handling (again).
I was thinking about misleadingness rather than performance. {Number of files} calls is not that problematic, but the function name making me lose 2 hours of debug is :D
By the way I still don't understand why locally everything work and not in the CI, but I'm short on time atm.
Does this fix https://github.com/pylint-dev/pylint/issues/8201?
No, maybe a rework is in order but it's not an easy rework to do.
🤖 According to the primer, this change has no effect on the checked open source code. 🤖🎉
This comment was generated for commit 9bc595bb4a413562333e3b241c7881cbe04209df
🤖 According to the primer, this change has no effect on the checked open source code. 🤖🎉
This comment was generated for commit 93a252c20565d25fef810325bcb6c98c1efb98b2
🤖 According to the primer, this change has no effect on the checked open source code. 🤖🎉
This comment was generated for commit d1e5206fb7dddc4ded1ee111e792b470c570a089
🤖 According to the primer, this change has no effect on the checked open source code. 🤖🎉
This comment was generated for commit 6984f2996eda5aec4b5b06d8e1e6eb6bae6261fd
🤖 According to the primer, this change has no effect on the checked open source code. 🤖🎉
This comment was generated for commit c088a47555b3e3fb49f5b7d6d45663bfbfa4bead
Thanks for your work here on this important improvement. I'm wondering what you think about backporting performance improvements. Should we try to keep the patch releases more stable by only backporting bugfixes and not refactors?
Oh woah, I had it backwards. This is the bugfix. Carry on!
I can understand the confusion because I'm trying very hard to optimize the bug fix itself 😄
🤖 According to the primer, this change has no effect on the checked open source code. 🤖🎉
This comment was generated for commit 1eedcbbe534559304d9fc3dbea9752143cf17ec5