Skip to content

Commit fd61c3e

Browse files
committed
fixing return statement
Signed-off-by: Monal-Reddy <monalreddy001@gmail.com>
1 parent 1556e35 commit fd61c3e

1 file changed

Lines changed: 4 additions & 14 deletions

File tree

scanpipe/pipes/__init__.py

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -45,29 +45,19 @@
4545

4646

4747
def normalize_extension(name, extension, max_length=100):
48-
"""
49-
Return a safe file extension or None.
50-
51-
Ensures the extension is derived from the file name and avoids
52-
storing invalid or oversized values.
53-
"""
5448
if not name:
55-
return None
49+
return ""
5650

57-
# Recompute extension from name (do not trust incoming value)
5851
suffix = Path(name).suffix
5952

6053
if not suffix:
61-
return None
54+
return ""
6255

63-
# Reject suspicious or non-standard extensions
6456
if not suffix.startswith("."):
65-
return None
57+
return ""
6658

67-
# Typical extensions are short (.py, .json, etc.)
68-
# Reject overly long ones instead of truncating garbage
6959
if len(suffix) > 20:
70-
return None
60+
return ""
7161

7262
return suffix
7363

0 commit comments

Comments
 (0)