Skip to content

Commit 9199067

Browse files
committed
docs(extensions): reference DEFAULT_HOOK_PRIORITY in normalize_priority
normalize_priority hard-coded the default as the literal 10 in both its signature and docstring, duplicating DEFAULT_HOOK_PRIORITY. Reference the constant in the signature and drop the literal from the docstring so the default has a single source of truth.
1 parent 60138aa commit 9199067

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/specify_cli/extensions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,15 +90,15 @@ class CompatibilityError(ExtensionError):
9090
pass
9191

9292

93-
def normalize_priority(value: Any, default: int = 10) -> int:
93+
def normalize_priority(value: Any, default: int = DEFAULT_HOOK_PRIORITY) -> int:
9494
"""Normalize a stored priority value for sorting and display.
9595
9696
Corrupted registry data may contain missing, non-numeric, non-positive, or
9797
boolean values. In those cases, fall back to the default priority.
9898
9999
Args:
100100
value: Priority value to normalize (may be int, str, None, etc.)
101-
default: Default priority to use for invalid values (default: 10)
101+
default: Default priority to use for invalid values
102102
103103
Returns:
104104
Normalized priority as positive integer (>= 1)

0 commit comments

Comments
 (0)