Since MirrorPath.from_s3_key() uses str.removesuffix(), it breaks when a non-str is passed. Checking for type would be nifty to save headaches.
Error when calling MirrorPath.from_s3_key(None)
labels=MirrorPath.from_s3_key(json_dict["labels"]),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Trevor\miniconda3\envs\test-venv\Lib\site-packages\S3MP\mirror_path.py", line 50, in from_s3_key
s3_key = s3_key.removesuffix('/')
^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'removesuffix'
Since
MirrorPath.from_s3_key()usesstr.removesuffix(), it breaks when a non-stris passed. Checking for type would be nifty to save headaches.Error when calling
MirrorPath.from_s3_key(None)