-
Notifications
You must be signed in to change notification settings - Fork 230
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
Corrected raise Error as e
syntax
#1566
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this PR! There are a couple of instances where we could probably get rid of the e
variable by replacing raise e
with raise
, which I did not comment individually on.
On a semi-related note, you also updated external/cinfony/webel.py
. First of all, it doesn't seem like we are using this any longer, so I think we could remove it. If we do want to use it in the future (or find some usage that I missed), we should switch to the current version (at https://github.com/cinfony/cinfony) and possibly create a conda package instead.
rmgpy/rmg/model.py
Outdated
@@ -354,7 +354,7 @@ def makeNewSpecies(self, object, label='', reactive=True, checkForExisting=True) | |||
try: | |||
spec = Species(index=speciesIndex, label=label, molecule=[molecule], reactive=reactive, | |||
thermo=object.thermo, transportData=object.transportData) | |||
except AttributeError, e: | |||
except AttributeErro: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Letter missing.
rmgpy/rmg/model.py
Outdated
@@ -1952,7 +1952,7 @@ def getSpecies(self, obj): | |||
try: | |||
spc = self.indexSpeciesDict[obj] | |||
return spc | |||
except KeyError, e: | |||
except KeyError as e: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like an unnecessary try/except clause...
OK, let me know if that's OK and I'll squash |
Codecov Report
@@ Coverage Diff @@
## master #1566 +/- ##
==========================================
+ Coverage 41.85% 41.85% +<.01%
==========================================
Files 165 165
Lines 28007 28004 -3
Branches 5713 5713
==========================================
Hits 11721 11721
+ Misses 15497 15494 -3
Partials 789 789
Continue to review full report at Codecov.
|
Thanks! The fixups look good. |
Should be good to go |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I think this looks good.
This will likely result in conflicts with other PRs, but they should be easily resolvable.
Corrected all instances of
raise Error, e:
to the correct syntaxraise Error as e:
. The former won't be supported in Py3.Also, if
e
isn't used, it was deleted.See https://www.python.org/dev/peps/pep-0008/#id51