-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
In this project there are very few cases where raw strings should be used (Type_Safe and Safe_Str__* is what should be used)
for example: https://github.com/owasp-sbot/Memory-FS/blob/dev/memory_fs/path_handlers/Path__Handler__Versioned.py#L9
class Path__Handler__Versioned(Schema__Memory_FS__Path__Handler): # Handler that stores files with version numbers (calculated from chain)
name : Safe_Id = Safe_Id("versioned")
# todo: file_id and file_ext should not be strings
def generate_path(self, file_id: str, file_ext: str, is_metadata: bool = True, version: int = 1) -> Safe_Str__File__Path:
ext = ".json" if is_metadata else f".{file_ext}"
return Safe_Str__File__Path(f"v{version}/{file_id}{ext}")
task: create a file that maps all these usages, so that they can be reviewed and bugs/todos created for it
Metadata
Metadata
Assignees
Labels
No labels