From 4b58eaa0536a9a6961f08b830926d084533a856b Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: Wed, 6 Mar 2024 17:37:07 -0500 Subject: [PATCH] Black format --- src/automation.py | 7 ++++++- src/rules/team/__init__.py | 10 +++++++++- src/rules/team/rank.py | 1 + src/utils/jira.py | 4 +++- tox.ini | 4 ++-- 5 files changed, 21 insertions(+), 5 deletions(-) diff --git a/src/automation.py b/src/automation.py index 38e7872..c35b953 100755 --- a/src/automation.py +++ b/src/automation.py @@ -56,7 +56,12 @@ def main(dry_run: bool, config_file: str, token: str) -> None: collector = getattr( jira_module, issue_config.get("collector", "get_issues") ) - issues = collector(jira_client, config["jira"]["project-id"], config["jira"]["subquery"], issue_type) + issues = collector( + jira_client, + config["jira"]["project-id"], + config["jira"]["subquery"], + issue_type, + ) issue_rules = [ getattr(rules_modules[automation], rule) for rule in issue_config.get("rules", []) diff --git a/src/rules/team/__init__.py b/src/rules/team/__init__.py index 014f9fe..324599c 100644 --- a/src/rules/team/__init__.py +++ b/src/rules/team/__init__.py @@ -6,4 +6,12 @@ from .rank import check_rank from .target_dates import check_target_dates -__all__ = [check_due_date, set_fix_version, check_parent_link, check_priority, check_quarter_label, check_rank, check_target_dates] +__all__ = [ + check_due_date, + set_fix_version, + check_parent_link, + check_priority, + check_quarter_label, + check_rank, + check_target_dates, +] diff --git a/src/rules/team/rank.py b/src/rules/team/rank.py index b10e171..e82e23d 100644 --- a/src/rules/team/rank.py +++ b/src/rules/team/rank.py @@ -33,6 +33,7 @@ This helps prioritize the work that is currently on-going rather than future improvements that have been ranked very high. """ + import jira diff --git a/src/utils/jira.py b/src/utils/jira.py index b32fdaa..540be05 100644 --- a/src/utils/jira.py +++ b/src/utils/jira.py @@ -3,7 +3,9 @@ import jira -def get_issues(jira_client: jira.client.JIRA, project_id: str, subquery: str, issue_type: str) -> list: +def get_issues( + jira_client: jira.client.JIRA, project_id: str, subquery: str, issue_type: str +) -> list: result = query_issues(jira_client, project_id, subquery, issue_type) preprocess(jira_client, result) return result diff --git a/tox.ini b/tox.ini index 14d320d..f48266e 100644 --- a/tox.ini +++ b/tox.ini @@ -21,14 +21,14 @@ commands = flake8 {posargs} [testenv:black] skip_install = true deps = black -commands = black --check --diff {posargs:tests} +commands = black --check --diff {posargs:src/ tests/} [testenv:black-format] # this step format code automatically based on black rules # it can be triggered manually skip_install = true deps = black -commands = black {posargs:tests} +commands = black {posargs:src/ tests/} [testenv:isort] skip_install = true