@@ -76,15 +76,11 @@ def in_path(self, path: Pattern) -> "FilesShouldCondition":
7676
7777 def should (self ) -> "PositiveMatchPatternFileConditionBuilder" :
7878 """Begin positive assertion (files SHOULD ...)."""
79- return PositiveMatchPatternFileConditionBuilder (
80- self ._project_path , list (self ._filters )
81- )
79+ return PositiveMatchPatternFileConditionBuilder (self ._project_path , list (self ._filters ))
8280
8381 def should_not (self ) -> "NegatedMatchPatternFileConditionBuilder" :
8482 """Begin negative assertion (files SHOULD NOT ...)."""
85- return NegatedMatchPatternFileConditionBuilder (
86- self ._project_path , list (self ._filters )
87- )
83+ return NegatedMatchPatternFileConditionBuilder (self ._project_path , list (self ._filters ))
8884
8985
9086class FilesShouldCondition :
@@ -111,15 +107,11 @@ def in_path(self, path: Pattern) -> "FilesShouldCondition":
111107
112108 def should (self ) -> "PositiveMatchPatternFileConditionBuilder" :
113109 """Begin positive assertion (files SHOULD ...)."""
114- return PositiveMatchPatternFileConditionBuilder (
115- self ._project_path , list (self ._filters )
116- )
110+ return PositiveMatchPatternFileConditionBuilder (self ._project_path , list (self ._filters ))
117111
118112 def should_not (self ) -> "NegatedMatchPatternFileConditionBuilder" :
119113 """Begin negative assertion (files SHOULD NOT ...)."""
120- return NegatedMatchPatternFileConditionBuilder (
121- self ._project_path , list (self ._filters )
122- )
114+ return NegatedMatchPatternFileConditionBuilder (self ._project_path , list (self ._filters ))
123115
124116
125117class PositiveMatchPatternFileConditionBuilder :
@@ -135,9 +127,7 @@ def have_no_cycles(self) -> "CycleFreeFileCondition":
135127
136128 def depend_on_files (self ) -> "DependOnFileConditionBuilder" :
137129 """Begin dependency assertion - files SHOULD depend on ..."""
138- return DependOnFileConditionBuilder (
139- self ._project_path , self ._filters , is_negated = False
140- )
130+ return DependOnFileConditionBuilder (self ._project_path , self ._filters , is_negated = False )
141131
142132 def depend_on_external_modules (
143133 self ,
@@ -192,9 +182,7 @@ def __init__(self, project_path: str | None, filters: list[Filter]) -> None:
192182
193183 def depend_on_files (self ) -> "DependOnFileConditionBuilder" :
194184 """Begin dependency assertion - files SHOULD NOT depend on ..."""
195- return DependOnFileConditionBuilder (
196- self ._project_path , self ._filters , is_negated = True
197- )
185+ return DependOnFileConditionBuilder (self ._project_path , self ._filters , is_negated = True )
198186
199187 def depend_on_external_modules (
200188 self ,
@@ -243,9 +231,7 @@ def adhere_to(
243231class DependOnFileConditionBuilder :
244232 """Configure dependency target patterns."""
245233
246- def __init__ (
247- self , project_path : str | None , filters : list [Filter ], is_negated : bool
248- ) -> None :
234+ def __init__ (self , project_path : str | None , filters : list [Filter ], is_negated : bool ) -> None :
249235 self ._project_path = project_path
250236 self ._filters = filters
251237 self ._is_negated = is_negated
@@ -285,9 +271,7 @@ def in_path(self, path: Pattern) -> "DependOnFileCondition":
285271class DependOnExternalModuleConditionBuilder :
286272 """Configure external module dependency target patterns."""
287273
288- def __init__ (
289- self , project_path : str | None , filters : list [Filter ], is_negated : bool
290- ) -> None :
274+ def __init__ (self , project_path : str | None , filters : list [Filter ], is_negated : bool ) -> None :
291275 self ._project_path = project_path
292276 self ._filters = filters
293277 self ._is_negated = is_negated
@@ -447,9 +431,7 @@ def check(self, options: CheckOptions | None = None) -> list[Violation]:
447431 if empty is not None :
448432 return empty
449433
450- return gather_regex_matching_violations (
451- nodes , self ._check_filters , self ._is_negated
452- )
434+ return gather_regex_matching_violations (nodes , self ._check_filters , self ._is_negated )
453435
454436
455437class CustomFileCheckableCondition :
0 commit comments