Skip to content

Commit d4e82f3

Browse files
committed
Format
1 parent ed99fde commit d4e82f3

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Scripts/o2_linter.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -988,21 +988,19 @@ class TestNameConstant(TestSpec):
988988
"""Test constexpr constant names."""
989989

990990
name = "name/constexpr-constant"
991-
message = (
992-
'Use UpperCamelCase for names of constexpr constants.'
993-
)
991+
message = "Use UpperCamelCase for names of constexpr constants."
994992
rationale = rationale_names
995993
references = references_names
996994
suffixes = [".h", ".cxx", ".C"]
997995

998996
def __init__(self) -> None:
999997
super().__init__()
1000998
keyword = r"(.+ )" # e.g. "static "
1001-
type_val = r"([\w:<>+\-*\/, ]+ )" # value type e.g. "std::array<Type, n + 1> "
999+
type_val = r"([\w:<>+\-*\/, ]+ )" # value type e.g. "std::array<Type, n + 1> "
10021000
prefix = r"(\w+::)" # prefix with namespace or class, e.g. "MyClass::"
10031001
name_val = r"(\w+)" # name of the constant
1004-
array = r"(\[.*\])" # array declaration: "[...]"
1005-
assignment = r"( =|\(\d|{)" # value assignment, e.g. " = 2", " = expression", "(2)", "{2}", "{{...}}"
1002+
array = r"(\[.*\])" # array declaration: "[...]"
1003+
assignment = r"( =|\(\d|{)" # value assignment, e.g. " = 2", " = expression", "(2)", "{2}", "{{...}}"
10061004
self.pattern = re.compile(rf"{keyword}?constexpr {type_val}?{prefix}*{name_val}{array}?{assignment}")
10071005

10081006
def test_line(self, line: str) -> bool:
@@ -1783,7 +1781,9 @@ def main():
17831781
print("Skipping writing in GITHUB_OUTPUT.")
17841782

17851783
# Print tips.
1786-
print("\nTip: You can run the O2 linter locally from the O2Physics directory with: python3 Scripts/o2_linter.py <files>")
1784+
print(
1785+
"\nTip: You can run the O2 linter locally from the O2Physics directory with: python3 Scripts/o2_linter.py <files>"
1786+
)
17871787

17881788
if not passed:
17891789
sys.exit(1)

0 commit comments

Comments
 (0)