Repository navigation
Handle assert_never() when imported from typing_extensions - #9782
Conversation
This comment has been minimized.
This comment has been minimized.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9782 +/- ##
=======================================
Coverage 95.81% 95.81%
=======================================
Files 174 174
Lines 18860 18860
=======================================
+ Hits 18070 18071 +1
+ Misses 790 789 -1
🚀 New features to boost your workflow:
|
This comment has been minimized.
This comment has been minimized.
Pierre-Sassoulas
left a comment
There was a problem hiding this comment.
Élégant fix, I like when we remove complexity and fix bugs at the same time it's surprisingly often happening too. Just a nit.
|
|
||
| from pylint.constants import PY311_PLUS | ||
|
|
||
| if PY311_PLUS: |
There was a problem hiding this comment.
I think we should use sys.version_info directly here. Importing from pylint create coupling so more maintenance work when we drop python 3.11 and more importantely code in the wild will never import out internal constants so it makes functional tests less likely to be representative of real code.
There was a problem hiding this comment.
Why is it Less maintenance?
There was a problem hiding this comment.
We'll have to modify this when we drop python 3.11 and the constant does not exists anymore, right ?
There was a problem hiding this comment.
Yes, but I was suggesting it was the same whether we use the constant or the version guard. The last times we dropped versions we also removed version guards.
There was a problem hiding this comment.
This is a functional test, I don't think functional test should look like internal pylint code. However it's not really important, let's move on
|
🤖 According to the primer, this change has no effect on the checked open source code. 🤖🎉 This comment was generated for commit 3ace500 |
|
The backport to To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-maintenance/3.2.x maintenance/3.2.x
# Navigate to the new working tree
cd .worktrees/backport-maintenance/3.2.x
# Create a new branch
git switch --create backport-9782-to-maintenance/3.2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 a48cd4c6a872b6565bc58030b74585812f327f36
# Push it to GitHub
git push --set-upstream origin backport-9782-to-maintenance/3.2.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-maintenance/3.2.xThen, create a pull request where the |
Type of Changes
Description
Closes #9780