Run pyupgrade for Python 3.6+
{'login': 'bryant1410', 'id': 3905501, 'node_id': 'MDQ6VXNlcjM5MDU1MDE=', 'avatar_url': 'https://avatars.githubusercontent.com/u/3905501?v=4', 'gravatar_id': '', 'url': 'https://api.github.com/users/bryant1410', 'html_url': 'https://github.com/bryant1410', 'followers_url': 'https://api.github.com/users/bryant1410/followers', 'following_url': 'https://api.github.com/users/bryant1410/following{/other_user}', 'gists_url': 'https://api.github.com/users/bryant1410/gists{/gist_id}', 'starred_url': 'https://api.github.com/users/bryant1410/starred{/owner}{/repo}', 'subscriptions_url': 'https://api.github.com/users/bryant1410/subscriptions', 'organizations_url': 'https://api.github.com/users/bryant1410/orgs', 'repos_url': 'https://api.github.com/users/bryant1410/repos', 'events_url': 'https://api.github.com/users/bryant1410/events{/privacy}', 'received_events_url': 'https://api.github.com/users/bryant1410/received_events', 'type': 'User', 'site_admin': False}
[]
[]
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`. > 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? I just resolved some conflicts with the master branch. If the CI is green we can merge :)
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.
{'url': 'https://api.github.com/repos/huggingface/datasets/issues/3560/reactions', 'total_count': 0, '+1': 0, '-1': 0, 'laugh': 0, 'hooray': 0, 'confused': 0, 'heart': 0, 'rocket': 0, 'eyes': 0}
{'url': 'https://api.github.com/repos/huggingface/datasets/pulls/3560', 'html_url': 'https://github.com/huggingface/datasets/pull/3560', 'diff_url': 'https://github.com/huggingface/datasets/pull/3560.diff', 'patch_url': 'https://github.com/huggingface/datasets/pull/3560.patch', 'merged_at': '2022-01-31T09:37:34Z'}