diff options
author | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2021-02-17 23:19:58 +0100 |
---|---|---|
committer | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2021-02-17 23:51:41 +0100 |
commit | 22af4f9f6e52622a2d265ad9629555b9735958a7 (patch) | |
tree | 53ef50edc1db6ac7acbf806405112f528716f87e | |
parent | ea96fc4bce94673671958e15d17bbcd75914b3f9 (diff) | |
download | astroid-git-22af4f9f6e52622a2d265ad9629555b9735958a7.tar.gz |
Use set litteral when possible
-rw-r--r-- | astroid/brain/brain_functools.py | 4 | ||||
-rw-r--r-- | setup.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/astroid/brain/brain_functools.py b/astroid/brain/brain_functools.py index f943f71a..8de5d812 100644 --- a/astroid/brain/brain_functools.py +++ b/astroid/brain/brain_functools.py @@ -94,11 +94,11 @@ def _functools_partial_inference(node, context=None): inferred_wrapped_function.args.posonlyargs or (), inferred_wrapped_function.args.kwonlyargs or (), ) - parameter_names = set( + parameter_names = { param.name for param in function_parameters if isinstance(param, astroid.AssignName) - ) + } if set(call.keyword_arguments) - parameter_names: raise astroid.UseInferenceDefault( "wrapped function received unknown parameters" @@ -36,7 +36,7 @@ with open(os.path.join(astroid_dir, "README.rst")) as fobj: long_description = fobj.read() -needs_pytest = set(["pytest", "test", "ptr"]).intersection(sys.argv) +needs_pytest = {"pytest", "test", "ptr"}.intersection(sys.argv) pytest_runner = ["pytest-runner"] if needs_pytest else [] |