File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 18
18
class PathPrefix (str , Enum ):
19
19
"""Path prefixes used for normalizing template paths."""
20
20
21
- PKG = "pkg: "
22
- APP = "app: "
23
- EXT = "ext: "
21
+ PKG = "pkg"
22
+ APP = "app"
23
+ EXT = "ext"
24
24
25
25
def prepend_to (self , path : str ) -> str :
26
26
"""Generate a prefixed path string by prepending this prefix to a path.
@@ -31,7 +31,7 @@ def prepend_to(self, path: str) -> str:
31
31
Returns:
32
32
str: A string with this prefix and the path
33
33
"""
34
- return f"{ self .value } { path } "
34
+ return f"{ self .value } : { path } "
35
35
36
36
@classmethod
37
37
def has_prefix (cls , path : str ) -> bool :
@@ -43,7 +43,7 @@ def has_prefix(cls, path: str) -> bool:
43
43
Returns:
44
44
bool: True if the path starts with any of the recognized prefixes
45
45
"""
46
- return any (path .startswith (prefix .value ) for prefix in cls )
46
+ return any (path .startswith (f" { prefix .value } :" ) for prefix in cls )
47
47
48
48
49
49
def normalize_path (path : str ) -> str :
You can’t perform that action at this time.
0 commit comments