-
-
Notifications
You must be signed in to change notification settings - Fork 519
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
Permanently get rid of bare except: statements #32788
Comments
comment:1
this should rather be done using the pycodestyle linter : code E722 https://pycodestyle.pycqa.org/en/latest/intro.html#error-codes |
comment:2
see #32680 and src/tox.ini |
comment:3
but in fact, I would like that the linters first turn both green before switching on the check for E722, so, let us hope that #32757 will at last give us green linters.. |
comment:4
another aim is to turn on E713 and E714, several recent tickets move on that way : #32766 |
comment:5
Current status of E722:
|
comment:6
Replying to @fchapoton:
A basic
|
Branch: u/chapoton/32788 |
comment:7
pycodestyle probably only looks at py files New commits:
|
Commit: |
comment:8
after my branch for py files, there remains
EDIT: the one in the doc is explaining that one should not do that.. |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:10
new commit for pyx files except the giac.pyx mess. |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:12
Replying to @fchapoton:
Out of curiosity, did the branch comes from a script ? |
comment:13
After a diagonal view at the commit, the |
comment:14
Replying to @sagetrac-tmonteil:
Not a script, just my poor old hands and fatiguated brain.. |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:16
Replying to @fchapoton:
Then i should stop developing for Sage given my extremely weak relative productivity in inspecting such issues. |
comment:17
Replying to @fchapoton:
I am trying to look at it, it seems that all indentation is shifted by one. |
Changed branch from u/chapoton/32788 to u/tmonteil/32788 |
comment:19
I added 2 commits dealing with The last two remaining cases are related with some New commits:
|
comment:20
|
comment:59
green bot again |
comment:60
can we please move on here ? |
Changed branch from u/chapoton/except_fix_branch to u/tmonteil/except_fix_branch |
comment:62
I cherry-picked the relevant commits and merged with --- a/src/sage/interfaces/polymake.py
+++ b/src/sage/interfaces/polymake.py
@@ -364,7 +364,7 @@ class PolymakeAbstract(ExtraTabCompletion, Interface):
try:
x = RDF(x)
return '{}'.format(x)
- except Exception:
+ except (TypeError, ValueError):
pass
raise NotImplementedError I am not sure if i have to revert that change. Last 10 new commits:
|
comment:63
Stalled in |
comment:64
red branch => needs work |
Changed branch from u/tmonteil/except_fix_branch to public/except_fix_branch |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
comment:67
now correctly rebased, needs test by somebody having polymake |
comment:68
There are two polymake test failures (see below), but they are not related to this ticket, so are best dealt with in another ticket. I am ready to set this ticket to positive, if someone could confirm that the new pycodestyle check still passes with 9.5 merged. Unfortunately, I have difficulties in running tox on my machine. By the way, this ticket will also fix a random doctest failure in
|
Changed reviewer from Jonathan Kliem to Jonathan Kliem, Markus Wageringel |
comment:69
Never mind. I have tried it on a different machine and |
comment:70
In |
comment:71
Replying to @slel:
I am happy to review it if anyone wants to change that, but I do not think it is necessary here. |
Changed branch from public/except_fix_branch to |
A while ago, @jdemeyer used to regularly take care of removing bare
except:
statements constantly introduced in Sage source code, se e.g. #27427, #14028, #11310, #21687, #24274.The goal of this ticket (perhaps should it be a task ticket ?) is to take over the work without self-abnegation by:
except:
statements.except:
statements are removed).CC: @kliem @frederichan-IMJPRG @videlec
Component: misc
Author: Frédéric Chapoton, Jonathan Kliem, Thierry Monteil
Branch/Commit:
de4faf6
Reviewer: Jonathan Kliem, Markus Wageringel
Issue created by migration from https://trac.sagemath.org/ticket/32788
The text was updated successfully, but these errors were encountered: