-
Notifications
You must be signed in to change notification settings - Fork 3
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
By file linting for more details ... #19
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.
Just a small fix for raising an exception. See greenbone/ospd#321 and in more detail https://docs.python.org/3/reference/simple_stmts.html#the-raise-statement
Besides that I really like that change 👍 I've thought about that too several times.
autohooks/plugins/pylint/pylint.py
Outdated
@@ -27,9 +27,9 @@ | |||
|
|||
def check_pylint_installed(): | |||
try: | |||
import pylint # pylint: disable=import-outside-toplevel | |||
import pylint # pylint: disable=import-outside-toplevel, disable=unused-import | |||
except ImportError: |
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.
except ImportError: | |
except ImportError as e: |
autohooks/plugins/pylint/pylint.py
Outdated
raise Exception from ImportError( | ||
'Could not find pylint. Please add pylint to your python ' | ||
'environment' | ||
) |
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.
raise Exception from ImportError( | |
'Could not find pylint. Please add pylint to your python ' | |
'environment' | |
) | |
raise Exception( | |
'Could not find pylint. Please add pylint to your python ' | |
'environment' | |
) from e |
autohooks/plugins/pylint/pylint.py
Outdated
args.extend(arguments) | ||
args.append(str(f.absolute_path())) | ||
status = subprocess.call(args) | ||
# str_files = ', '.join([str(f.path) for f in files]) |
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.
# str_files = ', '.join([str(f.path) for f in files]) |
What?
By file linting ...
Why?
Had visual issues in the console, when many files have been linted (maybe i will look hat the autohooks repo and edit it as well ...)
Checklist: