Skip to content

Commit

Permalink
Revert unnecessary indentation /
Browse files Browse the repository at this point in the history
formatting changes
  • Loading branch information
Dmytro Lapshyn committed Dec 16, 2020
1 parent ea4b223 commit ee6d690
Show file tree
Hide file tree
Showing 6 changed files with 104 additions and 36 deletions.
116 changes: 92 additions & 24 deletions jira_agile_metrics/calculators/cycletime_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,28 +46,29 @@ def jira(custom_fields):
customfield_100=None,
changes=[
Change(
"2018-01-02 10:01:01",
[("Flagged", None, "Impediment", "customfield_100")]
"2018-01-02 10:01:01", [("Flagged", None, "Impediment", "customfield_100")]
),
Change(
"2018-01-03 01:00:00",
[("Flagged", "Impediment", "", "customfield_100")]
"2018-01-03 01:00:00", [("Flagged", "Impediment", "", "customfield_100")]
), # blocked 1 day in the backlog (doesn't count towards blocked days)
Change(
"2018-01-03 01:01:01",
[("status", "Backlog", "Next",)]
[
(
"status",
"Backlog",
"Next",
)
]
),
Change(
"2018-01-04 10:01:01",
[("Flagged", "", "Impediment", "customfield_100")]
"2018-01-04 10:01:01", [("Flagged", "", "Impediment", "customfield_100")]
),
Change(
"2018-01-05 08:01:01",
[("Flagged", "Impediment", "", "customfield_100")]
"2018-01-05 08:01:01", [("Flagged", "Impediment", "", "customfield_100")]
), # was blocked 1 day
Change(
"2018-01-08 10:01:01",
[("Flagged", "", "Impediment", "customfield_100")]
"2018-01-08 10:01:01", [("Flagged", "", "Impediment", "customfield_100")]
), # stays blocked until today
],
),
Expand All @@ -86,23 +87,46 @@ def jira(custom_fields):
changes=[
Change(
"2018-01-03 01:01:01",
[("status", "Backlog", "Next",)]
[
(
"status",
"Backlog",
"Next",
)
]
),
Change(
"2018-01-04 01:01:01",
[("status", "Next", "Build",)]
[
(
"status",
"Next",
"Build",
)
]
),
Change(
"2018-01-04 10:01:01",
[("Flagged", None, "Impediment", "customfield_100")]
"2018-01-04 10:01:01", [("Flagged", None, "Impediment", "customfield_100")]
), # should clear two days later when issue resolved
Change(
"2018-01-05 01:01:01",
[("status", "Build", "QA",)]
[
(
"status",
"Build",
"QA",
)
]
),
Change(
"2018-01-06 01:01:01",
[("status", "QA", "Done",)]
[
(
"status",
"QA",
"Done",
)
]
),
],
),
Expand All @@ -121,15 +145,33 @@ def jira(custom_fields):
changes=[
Change(
"2018-01-04 01:01:01",
[("status", "Backlog", "Next",)]
[
(
"status",
"Backlog",
"Next",
)
]
),
Change(
"2018-01-05 01:01:01",
[("status", "Next", "Build",)]
[
(
"status",
"Next",
"Build",
)
]
),
Change(
"2018-01-06 01:01:01",
[("status", "Build", "Next",)]
[
(
"status",
"Build",
"Next",
)
]
),
Change(
"2018-01-07 01:01:01",
Expand Down Expand Up @@ -165,11 +207,24 @@ def jira_with_skipped_columns(custom_fields):
changes=[
Change(
"2018-01-02 01:05:01",
[("status", "Backlog", "Next",)]
[
(
"status",
"Backlog",
"Next",
)
]
),
Change(
"2018-01-04 01:01:01",
[("status", "Next", "Done",), ("resolution", None, "done")]
[
(
"status",
"Next",
"Done",
),
("resolution", None, "done")
]
), # skipping columns Build and Test
],
),
Expand All @@ -188,11 +243,24 @@ def jira_with_skipped_columns(custom_fields):
changes=[
Change(
"2018-01-02 01:05:01",
[("status", "Backlog", "Build",)]
[
(
"status",
"Backlog",
"Build",
)
]
),
Change(
"2018-01-04 01:01:01",
[("status", "Build", "Done",), ("resolution", None, "done")]
[
(
"status",
"Build",
"Done",
),
("resolution", None, "done")
]
), # skipping columns Build and Test
],
),
Expand Down
2 changes: 1 addition & 1 deletion jira_agile_metrics/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ def config_to_options(data, cwd=None, extended=False):
"progress_report_outcome_query": None,
"progress_report_outcome_deadline_field": None,
},
}
}

# Recursively parse an `extends` file but only if a base path is given,
# otherwise we can plausible leak files in server mode.
Expand Down
3 changes: 2 additions & 1 deletion jira_agile_metrics/config_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

from .config import force_list, expand_key, config_to_options, ConfigError


def test_force_list():
assert force_list(None) == [None]
assert force_list("foo") == ["foo"]
Expand Down Expand Up @@ -521,7 +522,7 @@ def test_config_to_options_extends():
Cycle time data: cycletime.csv
"""
% fp.name,
cwd=os.path.abspath(fp.name)
cwd=os.path.abspath(fp.name),
)
finally:
os.remove(fp.name)
Expand Down
3 changes: 1 addition & 2 deletions jira_agile_metrics/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ def __init__(self, fields):


class FauxChangeItem(object):
"""An item in a changelog change
"""
"""An item in a changelog change"""
def __init__(self, field, fromString, toString, fieldId=None):
self.field = field
self.fieldId = fieldId if fieldId is not None else field
Expand Down
14 changes: 7 additions & 7 deletions jira_agile_metrics/querymanager_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ def jira(custom_fields):
"status",
"Next",
"Done",
)
]
),
],
),
Change(
"2018-01-02 01:01:01",
Expand All @@ -56,7 +56,7 @@ def jira(custom_fields):
"Backlog",
"Next",
)
]
],
),
Change(
"2018-01-02 01:01:01",
Expand All @@ -67,7 +67,7 @@ def jira(custom_fields):
"Team 1",
"customfield_001",
)
]
],
),
Change(
"2018-01-04 01:01:01",
Expand All @@ -81,12 +81,12 @@ def jira(custom_fields):
"status",
"Done",
"QA",
)
]
),
],
),
],
)
]
],
)


Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tool.black]
line-length = 79
line-length = 179
include = '\.pyi?$'
exclude = '''
/(
Expand Down

0 comments on commit ee6d690

Please sign in to comment.