Repository navigation
Cookiecutter pre-commit workflow (fix flake8) - #3
Conversation
| l, h = map(int, s.split(",")) | ||
| return l, h | ||
| except: | ||
| except Exception: |
There was a problem hiding this comment.
this is looking a bit ugly. Why are we changing Exception into TypeError? I expect there is a better way of doing this.
| @@ -237,7 +239,7 @@ def component_plot(df_components, xrd=False, x_units=None, show=True): | |||
| """ | |||
| try: | |||
There was a problem hiding this comment.
this is also a bit ugly. It think that we just need to fix the requirements so that this works and remove the try/except.
| try: | ||
| plt.style.use(bg_mpl_style) | ||
| except: | ||
| except Exception: |
| try: | ||
| plt.style.use(bg_mpl_style) | ||
| except: | ||
| except Exception: |
There was a problem hiding this comment.
see above. Also, why is this happening multiple times. Don't we want to just set this at the top of the file and be done with it?
|
@sbillinge Please review! |
| @@ -34,11 +34,14 @@ def main(args=None): | |||
| parser = ArgumentParser(prog="nmf_mapping", description=_BANNER, formatter_class=RawTextHelpFormatter) | |||
|
|
|||
| def tup(s): | |||
There was a problem hiding this comment.
I think there is probably a better method for handling this with argparse. Also, it seems that the issue here would be that after parsing the string, they should be two integers, but why not just use the argparse ways of handling this?
sbillinge
left a comment
There was a problem hiding this comment.
I still don't like how the arg parsing was fixed but I will merge and fix it. Please can you make an issue and assign it to me? Thanks.
@sbillinge I made an issue #4. But not sure if I have the rights to add assignees:
|

Fixed all flake8 errors. Local pre-commit passes.
Fix F401 - remove imported but not used
Fix E501 - fix line too long problems
Fix F821 - import setuptools
Fix E741 - clarify variable name
Fix E722 - do not use bare 'except'
Reviewed PR
@sbillinge