Hi,
let’s say that I have a folder id as string.
I can get folder object from folder id as:
folder = self._client.folder(folder_id=folder_id).get()
Now I would like to iterate over folder items that can be files or (sub)folders.
for item in folder.get_items():
if item.type == 'folder':
sub_folder_path = folder_path + '/' + folder.name
For last line mypy reports:
64: error: “Folder” has no attribute “name” [attr-defined]
Looks like folder (the same is for file as well) has .name
property, but it is injected somehow on the fly.
I don’t like putting #noqa
nor doing hacks.
Is there anything I can do to pass mypy check with this line?
Regards,
Zoran