diff --git a/build_helpers/test_helpers.py b/build_helpers/test_helpers.py index 55e395bfa7e..1093752d59c 100644 --- a/build_helpers/test_helpers.py +++ b/build_helpers/test_helpers.py @@ -112,8 +112,8 @@ def test_find( scan_exclude=scan_exclude, ) - ret_set = set([str(Path(x)) for x in ret]) - expected_set = set([str(Path(x)) for x in expected]) + ret_set = {str(Path(x)) for x in ret} + expected_set = {str(Path(x)) for x in expected} assert ret_set == expected_set diff --git a/examples/plugins/example_configsource_plugin/setup.py b/examples/plugins/example_configsource_plugin/setup.py index d83f4627413..2cf5620221f 100644 --- a/examples/plugins/example_configsource_plugin/setup.py +++ b/examples/plugins/example_configsource_plugin/setup.py @@ -2,7 +2,7 @@ # type: ignore from setuptools import find_namespace_packages, setup -with open("README.md", "r") as fh: +with open("README.md") as fh: LONG_DESC = fh.read() setup( name="hydra-example-configsource", diff --git a/examples/plugins/example_generic_plugin/setup.py b/examples/plugins/example_generic_plugin/setup.py index e3cf09c02eb..2cb9ca71d83 100644 --- a/examples/plugins/example_generic_plugin/setup.py +++ b/examples/plugins/example_generic_plugin/setup.py @@ -2,7 +2,7 @@ # type: ignore from setuptools import find_namespace_packages, setup -with open("README.md", "r") as fh: +with open("README.md") as fh: LONG_DESC = fh.read() setup( name="hydra-example-generic-plugin", diff --git a/examples/plugins/example_launcher_plugin/setup.py b/examples/plugins/example_launcher_plugin/setup.py index 4492a62fa25..b5febbdd2aa 100644 --- a/examples/plugins/example_launcher_plugin/setup.py +++ b/examples/plugins/example_launcher_plugin/setup.py @@ -2,7 +2,7 @@ # type: ignore from setuptools import find_namespace_packages, setup -with open("README.md", "r") as fh: +with open("README.md") as fh: LONG_DESC = fh.read() setup( name="hydra-example-launcher", diff --git a/examples/plugins/example_registered_plugin/setup.py b/examples/plugins/example_registered_plugin/setup.py index 3ee801dc157..0a3f18b1524 100644 --- a/examples/plugins/example_registered_plugin/setup.py +++ b/examples/plugins/example_registered_plugin/setup.py @@ -2,7 +2,7 @@ # type: ignore from setuptools import setup -with open("README.md", "r") as fh: +with open("README.md") as fh: LONG_DESC = fh.read() setup( name="hydra-example-registered-plugin", diff --git a/examples/plugins/example_searchpath_plugin/setup.py b/examples/plugins/example_searchpath_plugin/setup.py index 53986dc30b4..432d3aaf49a 100644 --- a/examples/plugins/example_searchpath_plugin/setup.py +++ b/examples/plugins/example_searchpath_plugin/setup.py @@ -3,7 +3,7 @@ from setuptools import find_namespace_packages, setup, find_packages -with open("README.md", "r") as fh: +with open("README.md") as fh: LONG_DESC = fh.read() setup( name="hydra-example-searchpath-plugin", diff --git a/examples/plugins/example_sweeper_plugin/setup.py b/examples/plugins/example_sweeper_plugin/setup.py index eb85d9c3ef5..691b449a88b 100644 --- a/examples/plugins/example_sweeper_plugin/setup.py +++ b/examples/plugins/example_sweeper_plugin/setup.py @@ -2,7 +2,7 @@ # type: ignore from setuptools import find_namespace_packages, setup -with open("README.md", "r") as fh: +with open("README.md") as fh: LONG_DESC = fh.read() setup( name="hydra-example-sweeper", diff --git a/hydra/_internal/core_plugins/basic_sweeper.py b/hydra/_internal/core_plugins/basic_sweeper.py index afa2b506045..3e41fcb5529 100644 --- a/hydra/_internal/core_plugins/basic_sweeper.py +++ b/hydra/_internal/core_plugins/basic_sweeper.py @@ -62,7 +62,7 @@ def __init__( """ Instantiates """ - super(BasicSweeper, self).__init__() + super().__init__() if params is None: params = {} diff --git a/hydra/_internal/core_plugins/zsh_completion.py b/hydra/_internal/core_plugins/zsh_completion.py index af5d35aa7f8..9caf15ea9e5 100644 --- a/hydra/_internal/core_plugins/zsh_completion.py +++ b/hydra/_internal/core_plugins/zsh_completion.py @@ -10,7 +10,7 @@ class ZshCompletion(CompletionPlugin): def __init__(self, config_loader: ConfigLoader): - super(ZshCompletion, self).__init__(config_loader) + super().__init__(config_loader) from hydra._internal.core_plugins.bash_completion import BashCompletion self.delegate = BashCompletion(config_loader) diff --git a/hydra/_internal/defaults_list.py b/hydra/_internal/defaults_list.py index b4b0d92c950..d3bcb519fb0 100644 --- a/hydra/_internal/defaults_list.py +++ b/hydra/_internal/defaults_list.py @@ -312,7 +312,7 @@ def _check_not_missing( group_path, results_filter=ObjectType.CONFIG, ) - opt_list = "\n".join(["\t" + x for x in options]) + opt_list = "\n".join("\t" + x for x in options) msg = dedent( f"""\ You must specify '{override_key}', e.g, {override_key}=