Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] authored and atodorov committed Dec 10, 2023
1 parent 5ff4728 commit 3b5c105
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
8 changes: 7 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,13 @@ def get_version():
version_py_path = os.path.join("tcms_junit_plugin", "version.py")
with open(version_py_path, encoding="utf-8") as version_file:
version = version_file.read()
return version.replace(" ", "").replace("__version__=", "").strip().strip("'").strip('"')
return (
version.replace(" ", "")
.replace("__version__=", "")
.strip()
.strip("'")
.strip('"')
)


with open("README.rst", encoding="utf-8") as readme:
Expand Down
12 changes: 9 additions & 3 deletions tcms_junit_plugin/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,9 @@ def parse(
summary = self.testcase_summary(xml_suite, xml_case)[:255]

test_case, _ = self.backend.test_case_get_or_create(summary)
self.backend.add_test_case_to_plan(test_case["id"], self.backend.plan_id)
self.backend.add_test_case_to_plan(
test_case["id"], self.backend.plan_id
)

comment = self.backend.created_by_text
if not xml_case.result:
Expand Down Expand Up @@ -164,7 +166,9 @@ def parse(
test_case["id"],
self.backend.run_id,
):
start_date, stop_date = self.testexecution_timestamps(xml_suite, xml_case)
start_date, stop_date = self.testexecution_timestamps(
xml_suite, xml_case
)
self.backend.update_test_execution(
execution["id"],
status_id,
Expand Down Expand Up @@ -198,7 +202,9 @@ def main(argv):
help="Template summary from testcase, eg %(default)s.",
default=DEFAULT_TEMPLATE,
)
parser.add_argument("filename.xml", type=str, nargs="+", help="XML file(s) to parse")
parser.add_argument(
"filename.xml", type=str, nargs="+", help="XML file(s) to parse"
)

args = parser.parse_args(argv[1:])

Expand Down

0 comments on commit 3b5c105

Please sign in to comment.