Skip to content

Commit

Permalink
Black format
Browse files Browse the repository at this point in the history
  • Loading branch information
ralphbean committed Mar 6, 2024
1 parent 0d6c9a6 commit 4b58eaa
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 5 deletions.
7 changes: 6 additions & 1 deletion src/automation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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", [])
Expand Down
10 changes: 9 additions & 1 deletion src/rules/team/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
]
1 change: 1 addition & 0 deletions src/rules/team/rank.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
4 changes: 3 additions & 1 deletion src/utils/jira.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4b58eaa

Please sign in to comment.