Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Some style fixes #27

Merged
merged 1 commit into from
Jul 2, 2015
Merged

Some style fixes #27

merged 1 commit into from
Jul 2, 2015

Conversation

OrkoHunter
Copy link
Contributor

Fix https://landscape.io/github/OrkoHunter/networkx-metis/3/messages/error

  • binary-op-exception (W0711):
    Exception to catch is the result of a binary “%s” operation Used when the exception to catch is of the form “except A or B:”. If intending to catch multiple, rewrite as “except (A, B):”

It seems that populating networkx/addons/metis/__init__.py has generated a couple of cyclic imports.
https://landscape.io/github/OrkoHunter/networkx-metis/3/messages/smell

They can be fixed by using from . import module which I think is okay to do.
Nope. Can't fix that.

@@ -81,7 +81,7 @@ def function():
def _convert_exceptions(func, *args, **kwargs):
try:
return func(*args, **kwargs)
except catch_types or () as e:
except(catch_types, ()) as e:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you still want a space after except. This isn't a function call. http://stackoverflow.com/a/6470452

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well yes. Updating.

@SanketDG
Copy link
Contributor

Line 258 of this file and line 55 of test_metis.py longer than 79 chars. Might want to fix that.

@OrkoHunter
Copy link
Contributor Author

@chebee7i You should turn on the option of "Build only if .travis.yml is present" option.

@chebee7i
Copy link
Member

You are a maintainer on it, so you should configure it however networkx-metis needs it to be configured.

@OrkoHunter
Copy link
Contributor Author

You are a maintainer on it

I don't have the option to configure it (Travis?). I guess only owners and collaborators can do it.

@chebee7i
Copy link
Member

Oh sorry you meant for travis....yeah, I was referring to readthedocs.

@OrkoHunter
Copy link
Contributor Author

I edited the long line of this file. The line in test_metis.py is of 80 columns, I wouldn't mind it. However the complete tests are to be re-written ( #26 ) so I guess things would be covered.

@@ -81,7 +81,7 @@ def function():
def _convert_exceptions(func, *args, **kwargs):
try:
return func(*args, **kwargs)
except catch_types or () as e:
except (catch_types, ()) as e:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing or () should be good enough. (catch_types, ()) is wrong.

@OrkoHunter
Copy link
Contributor Author

Are we good here?

ysitu added a commit that referenced this pull request Jul 2, 2015
@ysitu ysitu merged commit 872cda0 into networkx:master Jul 2, 2015
@OrkoHunter OrkoHunter deleted the style_fixes branch July 2, 2015 04:30
@ysitu ysitu modified the milestone: networkx-metis-1.0 Jul 10, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants