-
-
Notifications
You must be signed in to change notification settings - Fork 585
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
Updates to address docstring code scan issues, add flake8 configuration #671
Merged
Merged
Changes from 7 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
08ae28a
Updates to address docstring code scan issues, add flake8 configuration
asears dabff1a
Update .flake8
asears e9468cc
Shorthand SPDX license one line header
asears 487d799
Merge branch 'master' of https://github.com/asears/bandit
asears 810b037
update main for single-line SPDX and remove additional comment
asears 6d6974b
revert init py docstrings.
asears 604faac
Revert headings after PR review
asears 0f2486a
remove 120 character limit setting
asears b72faa3
shorten description to address 80 character limit
asears 984575e
Merge branch 'master' into master
ericwb File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[flake8] | ||
max-line-length=120 | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,16 @@ | ||
#!/usr/bin/env python | ||
# SPDX-License-Identifier: Apache-2.0 | ||
"""Bandit is a tool designed to find common security issues in Python code. | ||
|
||
Bandit is a tool designed to find common security issues in Python code. | ||
To do this Bandit processes each file, builds an AST from it, and runs appropriate | ||
plugins against the AST nodes. Once Bandit has finished scanning all the files | ||
it generates a report. | ||
|
||
Bandit was originally developed within the OpenStack Security Project and | ||
later rehomed to PyCQA. | ||
|
||
https://bandit.readthedocs.io/ | ||
""" | ||
from bandit.cli import main | ||
main.main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Almost all of the codebase is already conforming to a 80 char max line length (inherited from checks when in OpenStack). Even though 80 can be short at times, I think it would be best to keep the pattern. Thanks
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.
Reverting this check. 119 is the limit for Github PR's, will stay with OpenStack convention.
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.
Wondering if line too long warning should be ignored individually for those single-line docstring comments, or should the docstring be split up?
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.
Yeah, we should line wrap those lines that are 80 or more. I already merged this commit, so feel free to create a new PR to handle above.