Improve typing and style and fix some inconsistencies
COLLABORATOR
@lhoestq Thanks for the quick review.
2021-02-23T15:56:00Z
https://github.com/huggingface/datasets/pull/1929#issuecomment-784304217
https://api.github.com/repos/huggingface/datasets/issues/1929
MDEyOklzc3VlQ29tbWVudDc4NDMwNDIxNw==
https://api.github.com/repos/huggingface/datasets/issues/comments/784304217/reactions
2021-02-23T15:56:00Z
https://api.github.com/repos/huggingface/datasets/issues/comments/784304217
https://avatars.githubusercontent.com/u/47462742?v=4
https://api.github.com/users/mariosasko/events{/privacy}
https://api.github.com/users/mariosasko/followers
https://api.github.com/users/mariosasko/following{/other_user}
https://api.github.com/users/mariosasko/gists{/gist_id}
https://github.com/mariosasko
mariosasko
MDQ6VXNlcjQ3NDYyNzQy
https://api.github.com/users/mariosasko/orgs
https://api.github.com/users/mariosasko/received_events
https://api.github.com/users/mariosasko/repos
https://api.github.com/users/mariosasko/starred{/owner}{/repo}
https://api.github.com/users/mariosasko/subscriptions
User
https://api.github.com/users/mariosasko
public
MEMBER
I merged master to this branch to re-run the CI before merging :)
2021-02-24T13:36:41Z
https://github.com/huggingface/datasets/pull/1929#issuecomment-785080346
https://api.github.com/repos/huggingface/datasets/issues/1929
MDEyOklzc3VlQ29tbWVudDc4NTA4MDM0Ng==
https://api.github.com/repos/huggingface/datasets/issues/comments/785080346/reactions
2021-02-24T13:36:41Z
https://api.github.com/repos/huggingface/datasets/issues/comments/785080346
https://avatars.githubusercontent.com/u/42851186?v=4
https://api.github.com/users/lhoestq/events{/privacy}
https://api.github.com/users/lhoestq/followers
https://api.github.com/users/lhoestq/following{/other_user}
https://api.github.com/users/lhoestq/gists{/gist_id}
https://github.com/lhoestq
lhoestq
MDQ6VXNlcjQyODUxMTg2
https://api.github.com/users/lhoestq/orgs
https://api.github.com/users/lhoestq/received_events
https://api.github.com/users/lhoestq/repos
https://api.github.com/users/lhoestq/starred{/owner}{/repo}
https://api.github.com/users/lhoestq/subscriptions
User
https://api.github.com/users/lhoestq
public
This PR:
* improves typing (mostly more consistent use of `typing.Optional`)
* `DatasetDict.cleanup_cache_files` now correctly returns a dict 
* replaces `dict()` with the corresponding literal
* uses `dict_to_copy.copy()` instead of `dict(dict_to_copy)` for shallow copying