diff --git a/python/edm4hep/__init__.py b/python/edm4hep/__init__.py index 98048ff87..8880cdf59 100644 --- a/python/edm4hep/__init__.py +++ b/python/edm4hep/__init__.py @@ -24,9 +24,9 @@ res = ROOT.gInterpreter.LoadFile("edm4hep/Constants.h") if res != 0: raise RuntimeError("Failed to load Constants.h") -from ROOT import edm4hep +from ROOT import edm4hep # noqa: E402 -from podio.pythonizations import load_pythonizations +from podio.pythonizations import load_pythonizations # noqa: E402 load_pythonizations("edm4hep") diff --git a/scripts/updateReadmeLinks.py b/scripts/updateReadmeLinks.py index 232d6ae88..4aed7c963 100755 --- a/scripts/updateReadmeLinks.py +++ b/scripts/updateReadmeLinks.py @@ -25,9 +25,10 @@ def check_readme_links(): new_readme_content = "" links_are_ok = True - for readme_line in readme_content: + for readme_content_line in readme_content: + readme_line = readme_content_line edm4hep_objects = re.findall( - "\[(.*?)\]\(https:\/\/github.com\/key4hep\/EDM4hep\/blob\/main\/edm4hep\.yaml#L(\d+?)\)", + r"\[(.*?)\]\(https:\/\/github.com\/key4hep\/EDM4hep\/blob\/main\/edm4hep\.yaml#L(\d+?)\)", readme_line, ) if edm4hep_objects: @@ -41,7 +42,8 @@ def check_readme_links(): ] if len(edm4hep_yaml_line_numbers_with_match) != 1: print( - f"Error: failed to replace line number for {edm4hep_object}, either no or several matches were found in edm4hep.yaml with the regex '{regex}'" + f"Error: failed to replace line number for {edm4hep_object}, either no " + f"or several matches were found in edm4hep.yaml with the regex '{regex}'" ) sys.exit(1) if edm4hep_yaml_line_numbers_with_match[0] != original_line_number: @@ -51,7 +53,7 @@ def check_readme_links(): f"[{edm4hep_object}](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L{edm4hep_yaml_line_numbers_with_match[0]})", ) print( - f"{edm4hep_object} is wrongly linked (line {original_line_number} --> {edm4hep_yaml_line_numbers_with_match[0]})" + f"{edm4hep_object} is wrongly linked (line {original_line_number} --> {edm4hep_yaml_line_numbers_with_match[0]})" # noqa: E501 ) new_readme_content += readme_line return links_are_ok, new_readme_content diff --git a/test/conftest.py b/test/conftest.py index 228cc9be1..d56bd388a 100644 --- a/test/conftest.py +++ b/test/conftest.py @@ -14,5 +14,5 @@ def pytest_addoption(parser): def pytest_configure(config): """This is a slighty hacky solution to make the pytest configuration available in test modules outside of fixtures""" - global options + global options # noqa: PLW0603 options = config.option diff --git a/test/utils/test_kinematics.py b/test/utils/test_kinematics.py index 4cdbc889e..f460ecde0 100644 --- a/test/utils/test_kinematics.py +++ b/test/utils/test_kinematics.py @@ -1,7 +1,6 @@ #!/usr/bin/env python3 import unittest -import cppyy import edm4hep