-
-
Notifications
You must be signed in to change notification settings - Fork 33.6k
Closed
Description
In file Lib/code.py between lines 220-231 we have:
try:
sys.ps1
delete_ps1_after = False
except AttributeError:
sys.ps1 = ">>> "
delete_ps1_after = True
try:
_ps2 = sys.ps2
delete_ps2_after = False
except AttributeError:
sys.ps2 = "... "
delete_ps2_after = TrueAs can be seen in the code snippet the existence of sys.ps1 and sys.ps2 is checked using try except blocks.
But in the second case with an unused local variable _ps2.
In order to enhance the code quality I propose to unify the approach and remove this _ps2 because it is never used.
Linked PRs
Metadata
Metadata
Assignees
Labels
No labels