Run pyupgrade for Python 3.6+
MEMBER
Hi ! Thanks for the change :)
Could it be possible to only run it for the code in `src/` ? We try to not change the code in the `datasets/` directory too often since it refreshes the users cache when they upgrade `datasets`.
2022-01-12T14:49:44Z
https://github.com/huggingface/datasets/pull/3560#issuecomment-1011122505
https://api.github.com/repos/huggingface/datasets/issues/3560
IC_kwDODunzps48RIFJ
https://api.github.com/repos/huggingface/datasets/issues/comments/1011122505/reactions
2022-01-12T14:49:44Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1011122505
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
CONTRIBUTOR
> Hi ! Thanks for the change :)
> Could it be possible to only run it for the code in `src/` ? We try to not change the code in the `datasets/` directory too often since it refreshes the users cache when they upgrade `datasets`.

I reverted the changes in `datasets/` instead of changing only `src/`. Does it sound good?
2022-01-12T15:11:46Z
https://github.com/huggingface/datasets/pull/3560#issuecomment-1011144778
https://api.github.com/repos/huggingface/datasets/issues/3560
IC_kwDODunzps48RNhK
https://api.github.com/repos/huggingface/datasets/issues/comments/1011144778/reactions
2022-01-12T15:11:46Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1011144778
https://avatars.githubusercontent.com/u/3905501?v=4
https://api.github.com/users/bryant1410/events{/privacy}
https://api.github.com/users/bryant1410/followers
https://api.github.com/users/bryant1410/following{/other_user}
https://api.github.com/users/bryant1410/gists{/gist_id}
https://github.com/bryant1410
bryant1410
MDQ6VXNlcjM5MDU1MDE=
https://api.github.com/users/bryant1410/orgs
https://api.github.com/users/bryant1410/received_events
https://api.github.com/users/bryant1410/repos
https://api.github.com/users/bryant1410/starred{/owner}{/repo}
https://api.github.com/users/bryant1410/subscriptions
User
https://api.github.com/users/bryant1410
public
MEMBER
I just resolved some conflicts with the master branch. If the CI is green we can merge :)
2022-01-31T08:54:54Z
https://github.com/huggingface/datasets/pull/3560#issuecomment-1025507317
https://api.github.com/repos/huggingface/datasets/issues/3560
IC_kwDODunzps49H__1
https://api.github.com/repos/huggingface/datasets/issues/comments/1025507317/reactions
2022-01-31T08:54:54Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1025507317
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
Run the command:

```bash
pyupgrade $(find . -name "*.py" -type f) --py36-plus
```

Which mainly avoids unnecessary lists creations and also removes unnecessary code for Python 3.6+.

It was originally part of #3489.

Tip for reviewing faster: use the CLI (`git diff`) and scroll.