diff --git a/.flake8 b/.flake8 index d404e7fd..a35f75e0 100644 --- a/.flake8 +++ b/.flake8 @@ -8,8 +8,11 @@ rst-roles = class,const,func,meth,mod,ref rst-directives = deprecated per-file-ignores = - # prefer naming tests descriptively rather than forcing comments - spiffworkflow-backend/tests/*:S101,D103 + # asserts are ok in tests + 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/conftest.py:S105 diff --git a/bin/run_pyl b/bin/run_pyl index bceba187..20953cb4 100755 --- a/bin/run_pyl +++ b/bin/run_pyl @@ -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 '' } -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() { # 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. @@ -79,7 +73,6 @@ done for python_project in "${python_projects[@]}" ; do if [[ "$subcommand" != "pre" ]] || [[ -n "$(git status --porcelain "$python_project")" ]]; then pushd "$python_project" - run_fix_docstrings || run_fix_docstrings run_autoflake || run_autoflake popd fi diff --git a/spiffworkflow-backend/.flake8 b/spiffworkflow-backend/.flake8 index 1cc09c97..481ae8d3 100644 --- a/spiffworkflow-backend/.flake8 +++ b/spiffworkflow-backend/.flake8 @@ -8,8 +8,11 @@ rst-roles = class,const,func,meth,mod,ref rst-directives = deprecated per-file-ignores = - # prefer naming tests descriptively rather than forcing comments - tests/*:S101,D103 + # asserts are ok in tests + tests/*:S101 + + # prefer naming functions descriptively rather than forcing comments + *:D103 bin/keycloak_test_server.py:B950,D conftest.py:S105 diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/routes/user.py b/spiffworkflow-backend/src/spiffworkflow_backend/routes/user.py index 5a3aa53d..9182d99f 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/routes/user.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/routes/user.py @@ -303,7 +303,6 @@ def login_api() -> Response: 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["redirect_url"]