diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-10-01 20:54:53 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-10-01 20:54:53 +0100 |
commit | 391b5b359a346aff490103da7dddc85047f83830 (patch) | |
tree | 29eea460a0bd7e1ff21d43b9d6df9af4d8a175e1 /dev-util/vint/files/vint-0.3.21-fix-py3.8.patch | |
parent | c719fdcee603a5a706a45d10cb598762d56a727d (diff) |
gentoo resync : 01.10.2021
Diffstat (limited to 'dev-util/vint/files/vint-0.3.21-fix-py3.8.patch')
-rw-r--r-- | dev-util/vint/files/vint-0.3.21-fix-py3.8.patch | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/dev-util/vint/files/vint-0.3.21-fix-py3.8.patch b/dev-util/vint/files/vint-0.3.21-fix-py3.8.patch new file mode 100644 index 000000000000..af97c51cf2c4 --- /dev/null +++ b/dev-util/vint/files/vint-0.3.21-fix-py3.8.patch @@ -0,0 +1,29 @@ +From f8bae710ba74dcc55a3b95995fe73139cf949b75 Mon Sep 17 00:00:00 2001 +From: Daniel Hahler <git@thequod.de> +Date: Mon, 25 Nov 2019 06:41:39 +0100 +Subject: [PATCH] Fix SyntaxWarning with py38 (#334) + +> SyntaxWarning: "is not" with a literal. Did you mean "!="? +--- a/vint/ast/plugin/scope_plugin/scope_linker.py ++++ b/vint/ast/plugin/scope_plugin/scope_linker.py +@@ -406,14 +406,17 @@ def _handle_function_node(self, func_node): # type: (Dict[str, Any]) -> None + # We can access "a:firstline" and "a:lastline" if the function is + # declared with an attribute "range". See :func-range + attr = func_node['attr'] +- is_declared_with_range = attr['range'] is not 0 ++ is_declared_with_range = attr['range'] != 0 + if is_declared_with_range: + self._scope_tree_builder.handle_new_range_parameters_found() + + # We can access "l:self" is declared with an attribute "dict" or + # the function is a member of a dict. See :help self +- is_declared_with_dict = attr['dict'] is not 0 \ +- or NodeType(func_name_node['type']) in FunctionNameNodesDeclaringVariableSelf ++ is_declared_with_dict = ( ++ attr["dict"] != 0 ++ or NodeType(func_name_node["type"]) ++ in FunctionNameNodesDeclaringVariableSelf ++ ) + if is_declared_with_dict: + self._scope_tree_builder.handle_new_dict_parameter_found() + |