Skip to content
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

Merged
merged 3 commits into from
Aug 25, 2020

Conversation

y0urself
Copy link
Member

@y0urself y0urself commented Aug 24, 2020

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:

@y0urself y0urself requested a review from bjoernricks as a code owner August 24, 2020 14:51
Copy link
Contributor

@bjoernricks bjoernricks left a 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.

@@ -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:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
except ImportError:
except ImportError as e:

Comment on lines 32 to 35
raise Exception from ImportError(
'Could not find pylint. Please add pylint to your python '
'environment'
)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
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

args.extend(arguments)
args.append(str(f.absolute_path()))
status = subprocess.call(args)
# str_files = ', '.join([str(f.path) for f in files])
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# str_files = ', '.join([str(f.path) for f in files])

@bjoernricks bjoernricks merged commit 555eff1 into greenbone:master Aug 25, 2020
@bjoernricks bjoernricks mentioned this pull request Nov 15, 2020
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants