Skip to content

Commit 53aff91

Browse files
[REGRESSION] Fix for indentation issue in docs utils. (- WIP PR #273 -)
Changes in file docs/utils.py: - use only tabs for indentation
1 parent b8e6607 commit 53aff91

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

docs/utils.py

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -72,18 +72,16 @@ def _validate_git_ref(ref: str) -> str:
7272
GIT_REF_PATTERN = r'^[a-zA-Z0-9][a-zA-Z0-9_\-./]*$'
7373

7474
def _validate_git_ref(ref: str) -> str:
75-
"""
76-
Validate if the provided string is a valid Git reference.
77-
78-
Git reference naming rules:
79-
- Must start with an alphanumeric character
80-
- Can contain alphanumeric characters, underscore, hyphen, forward slash, and dot
81-
- Cannot contain consecutive dots (..)
82-
...
83-
"""
84-
if not re.match(GIT_REF_PATTERN, ref) or '..' in ref:
85-
raise ValueError(f"Invalid Git reference: {ref}")
86-
return ref
75+
"""
76+
Validate if the provided string is a valid Git reference.
77+
78+
Git reference naming rules:
79+
- Must start with an alphanumeric character
80+
- Can contain alphanumeric characters, underscore, hyphen, forward slash, and dot
81+
- Cannot contain consecutive dots (..)
82+
...
83+
"""
84+
if not re.match(GIT_REF_PATTERN, ref) or ".." in ref:
8785
raise ValueError(f"Invalid Git reference: {ref}")
8886
return ref
8987

0 commit comments

Comments
 (0)