add_extension_if_not_present

from noon import add_extension_if_not_present

Source-derived function. Host availability is not inferred from this listing. See reference scope.

add_extension_if_not_present(file_name: Path, extension: str) -> Path
ParameterKindAnnotationDefault
file_namepositional or keywordPathNo default
extensionpositional or keywordstrNo default

Return annotation: Path

Append the extension to the existing suffix, preserving matching paths.

Source declaration