Initialize Article Data Manager project
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
"""Article number normalization."""
|
||||
|
||||
|
||||
def normalize_article_number(value: str) -> str:
|
||||
"""Trim surrounding whitespace while preserving leading zeros and text content."""
|
||||
|
||||
if not isinstance(value, str):
|
||||
raise TypeError("Article number must be provided as a string.")
|
||||
normalized = value.strip()
|
||||
if normalized == "":
|
||||
raise ValueError("Article number must not be empty.")
|
||||
return normalized
|
||||
Reference in New Issue
Block a user