@@ -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 ("\n Tip: You can run the O2 linter locally from the O2Physics directory with: python3 Scripts/o2_linter.py <files>" )
1784+ print (
1785+ "\n Tip: 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