disabled flake8 forcing comments to avoid all of the useless comments but still enforcing the formatting of comments if they exist w/ burnettk
This commit is contained in:
parent
6a6bde2788
commit
2cd861bdd3
7
.flake8
7
.flake8
|
@ -8,8 +8,11 @@ rst-roles = class,const,func,meth,mod,ref
|
||||||
rst-directives = deprecated
|
rst-directives = deprecated
|
||||||
|
|
||||||
per-file-ignores =
|
per-file-ignores =
|
||||||
# prefer naming tests descriptively rather than forcing comments
|
# asserts are ok in tests
|
||||||
spiffworkflow-backend/tests/*:S101,D103
|
spiffworkflow-backend/tests/*:S101
|
||||||
|
|
||||||
|
# prefer naming functions descriptively rather than forcing comments
|
||||||
|
spiffworkflow-backend/*:D103
|
||||||
|
|
||||||
spiffworkflow-backend/bin/keycloak_test_server.py:B950,D
|
spiffworkflow-backend/bin/keycloak_test_server.py:B950,D
|
||||||
spiffworkflow-backend/conftest.py:S105
|
spiffworkflow-backend/conftest.py:S105
|
||||||
|
|
|
@ -31,12 +31,6 @@ function get_python_dirs() {
|
||||||
(git ls-tree -r HEAD --name-only | grep -E '\.py$' | awk -F '/' '{print $1}' | sort | uniq | grep -v '\.' | grep -Ev '^(bin|migrations)$') || echo ''
|
(git ls-tree -r HEAD --name-only | grep -E '\.py$' | awk -F '/' '{print $1}' | sort | uniq | grep -v '\.' | grep -Ev '^(bin|migrations)$') || echo ''
|
||||||
}
|
}
|
||||||
|
|
||||||
function run_fix_docstrings() {
|
|
||||||
if command -v fix_python_docstrings >/dev/null ; then
|
|
||||||
fix_python_docstrings $(get_top_level_directories_containing_python_files)
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
function run_autoflake() {
|
function run_autoflake() {
|
||||||
# checking command -v autoflake8 is not good enough, since the asdf shim may be installed, which will make command -v succeed,
|
# checking command -v autoflake8 is not good enough, since the asdf shim may be installed, which will make command -v succeed,
|
||||||
# but autoflake8 may not have been pip installed inside the correct version of python.
|
# but autoflake8 may not have been pip installed inside the correct version of python.
|
||||||
|
@ -79,7 +73,6 @@ done
|
||||||
for python_project in "${python_projects[@]}" ; do
|
for python_project in "${python_projects[@]}" ; do
|
||||||
if [[ "$subcommand" != "pre" ]] || [[ -n "$(git status --porcelain "$python_project")" ]]; then
|
if [[ "$subcommand" != "pre" ]] || [[ -n "$(git status --porcelain "$python_project")" ]]; then
|
||||||
pushd "$python_project"
|
pushd "$python_project"
|
||||||
run_fix_docstrings || run_fix_docstrings
|
|
||||||
run_autoflake || run_autoflake
|
run_autoflake || run_autoflake
|
||||||
popd
|
popd
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -8,8 +8,11 @@ rst-roles = class,const,func,meth,mod,ref
|
||||||
rst-directives = deprecated
|
rst-directives = deprecated
|
||||||
|
|
||||||
per-file-ignores =
|
per-file-ignores =
|
||||||
# prefer naming tests descriptively rather than forcing comments
|
# asserts are ok in tests
|
||||||
tests/*:S101,D103
|
tests/*:S101
|
||||||
|
|
||||||
|
# prefer naming functions descriptively rather than forcing comments
|
||||||
|
*:D103
|
||||||
|
|
||||||
bin/keycloak_test_server.py:B950,D
|
bin/keycloak_test_server.py:B950,D
|
||||||
conftest.py:S105
|
conftest.py:S105
|
||||||
|
|
|
@ -303,7 +303,6 @@ def login_api() -> Response:
|
||||||
|
|
||||||
|
|
||||||
def login_api_return(code: str, state: str, session_state: str) -> str:
|
def login_api_return(code: str, state: str, session_state: str) -> str:
|
||||||
"""Login_api_return."""
|
|
||||||
state_dict = ast.literal_eval(base64.b64decode(state).decode("utf-8"))
|
state_dict = ast.literal_eval(base64.b64decode(state).decode("utf-8"))
|
||||||
state_dict["redirect_url"]
|
state_dict["redirect_url"]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue