internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: vyperlang/vyper

Issue:
Better error message for missing enum item
### Version Information

* vyper Version (output of `vyper --version`): 0.3.8
* OS: osx
* Python Version (output of `python --version`): Python 3.8.6

### What's your issue about?

Would it be possible to have more descriptive message for following error – missing item in enum?

```vyper
enum Roles:
    ADMIN
    USER
#   GUEST

... 

Roles.GUEST
```

Right now I get `ERROR: Unable to load project. Reason: AttributeError: 'VyperType' object has no attribute '_id'`.

### How can it be fixed?

--



Discussion:

Resolving patch:
diff --git a/vyper/semantics/types/user.py b/vyper/semantics/types/user.py
--- a/vyper/semantics/types/user.py
+++ b/vyper/semantics/types/user.py
@@ -55,6 +55,9 @@ def __init__(self, name: str, members: dict) -> None:
         # also conveniently checks well-formedness of the members namespace
         self._helper = VyperType(members)
 
+        # set the name for exception handling in `get_member`
+        self._helper._id = name
+
     def get_type_member(self, key: str, node: vy_ast.VyperNode) -> "VyperType":
         self._helper.get_member(key, node)
         return self


Test patch:
diff --git a/tests/parser/syntax/test_enum.py b/tests/parser/syntax/test_enum.py
--- a/tests/parser/syntax/test_enum.py
+++ b/tests/parser/syntax/test_enum.py
@@ -7,6 +7,7 @@
     NamespaceCollision,
     StructureException,
     TypeMismatch,
+    UnknownAttribute,
 )
 
 fail_list = [
@@ -97,6 +98,18 @@ def foo():nonpayable
     """,
         EnumDeclarationException,
     ),
+    (
+        """
+enum Roles:
+    ADMIN
+    USER
+
+@external
+def foo() -> Roles:
+    return Roles.GUEST
+    """,
+        UnknownAttribute,
+    ),
 ]
Repository: vyperlang/vyper

Issue:
 `FunctionDef` inside interfaces can be decorated
### Version Information

* vyper Version (output of `vyper --version`): 0.3.8+commit.02339dfd
* OS: OSX
* Python Version (output of `python --version`): 3.8.0

### What's your issue about?

`FunctionDef` inside interfaces can be decorated. For example, the following contract compiles.

```Vyper
interface A:
    @external
    @nonreentrant("key")
    @pure
    def foo(): nonpayable
```


Discussion:

Resolving patch:
diff --git a/vyper/semantics/types/user.py b/vyper/semantics/types/user.py
--- a/vyper/semantics/types/user.py
+++ b/vyper/semantics/types/user.py
@@ -468,6 +468,10 @@ def _get_class_functions(base_node: vy_ast.InterfaceDef) -> Dict[str, ContractFu
             raise NamespaceCollision(
                 f"Interface contains multiple functions named '{node.name}'", node
             )
+        if len(node.decorator_list) > 0:
+            raise StructureException(
+                "Function definition in interface cannot be decorated", node.decorator_list[0]
+            )
         functions[node.name] = ContractFunctionT.from_FunctionDef(node, is_interface=True)
 
     return functions


Test patch:
diff --git a/tests/parser/syntax/test_interfaces.py b/tests/parser/syntax/test_interfaces.py
--- a/tests/parser/syntax/test_interfaces.py
+++ b/tests/parser/syntax/test_interfaces.py
@@ -5,6 +5,7 @@
     ArgumentException,
     InvalidReference,
     InvalidType,
+    StructureException,
     SyntaxException,
     TypeMismatch,
     UnknownAttribute,
@@ -76,6 +77,14 @@ def test(a: address):
     """,
         SyntaxException,
     ),
+    (
+        """
+interface A:
+    @external
+    def foo(): nonpayable
+    """,
+        StructureException,
+    ),
 ]
Repository: vyperlang/vyper

Issue:
`FunctionNodeVisitor` visits twice `sqrt` body
### Version Information

* vyper Version (output of `vyper --version`): 0.3.8+commit.d76c6ed2
* OS: OSX
* Python Version (output of `python --version`): 3.8.0

### What's your issue about?

The `FunctionNodeVisitor` seems to visit twice the body of `sqrt` builtin, the first time is in the `__init__` function of the `FunctionNodeVisitor` and the second time after its creation using a `for` loop over its body.
https://github.com/vyperlang/vyper/blob/187ab0eec8efbe19ed5046e4e947249e9d43141c/vyper/builtins/_utils.py#L28-L30

https://github.com/vyperlang/vyper/blob/187ab0eec8efbe19ed5046e4e947249e9d43141c/vyper/semantics/analysis/local.py#L178-L179



Discussion:

Resolving patch:
diff --git a/vyper/builtins/_utils.py b/vyper/builtins/_utils.py
--- a/vyper/builtins/_utils.py
+++ b/vyper/builtins/_utils.py
@@ -25,9 +25,9 @@ def generate_inline_function(code, variables, variables_2, memory_allocator):
         ast_code.body[0]._metadata["type"] = ContractFunctionT(
             "sqrt_builtin", {}, 0, 0, None, FunctionVisibility.INTERNAL, StateMutability.NONPAYABLE
         )
-        sv = FunctionNodeVisitor(ast_code, ast_code.body[0], namespace)
-        for n in ast_code.body[0].body:
-            sv.visit(n)
+        # The FunctionNodeVisitor's constructor performs semantic checks
+        # annotate the AST as side effects.
+        FunctionNodeVisitor(ast_code, ast_code.body[0], namespace)
 
     new_context = Context(
         vars_=variables, global_ctx=GlobalContext(), memory_allocator=memory_allocator


Test patch:
Repository: vyperlang/vyper

Issue:
Add missing PC Maps to `vyper_json` output
### Version Information

* vyper Version (output of `vyper --version`): 0.3.7
* OS: macOS
* Python Version (output of `python --version`): 3.9.13

### What's your issue about?

The following PC Maps are missing from `vyper_json` output, with `"outputSelection": "*"`:

* `breakpoints`
* `error_map`
* `pc_breakpoint`
* `pc_pos_map`

### How can it be fixed?

Fill this in if you know how to fix it.



Discussion:

Resolving patch:
diff --git a/vyper/cli/vyper_json.py b/vyper/cli/vyper_json.py
--- a/vyper/cli/vyper_json.py
+++ b/vyper/cli/vyper_json.py
@@ -24,6 +24,7 @@
     "evm.deployedBytecode.object": "bytecode_runtime",
     "evm.deployedBytecode.opcodes": "opcodes_runtime",
     "evm.deployedBytecode.sourceMap": "source_map",
+    "evm.deployedBytecode.sourceMapFull": "source_map_full",
     "interface": "interface",
     "ir": "ir_dict",
     "ir_runtime": "ir_runtime_dict",
@@ -418,7 +419,8 @@ def format_to_output_dict(compiler_data: Dict) -> Dict:
             if "opcodes" in data:
                 evm["opcodes"] = data["opcodes"]
 
-        if any(i + "_runtime" in data for i in evm_keys) or "source_map" in data:
+        pc_maps_keys = ("source_map", "source_map_full")
+        if any(i + "_runtime" in data for i in evm_keys) or any(i in data for i in pc_maps_keys):
             evm = output_contracts.setdefault("evm", {}).setdefault("deployedBytecode", {})
             if "bytecode_runtime" in data:
                 evm["object"] = data["bytecode_runtime"]
@@ -426,6 +428,8 @@ def format_to_output_dict(compiler_data: Dict) -> Dict:
                 evm["opcodes"] = data["opcodes_runtime"]
             if "source_map" in data:
                 evm["sourceMap"] = data["source_map"]["pc_pos_map_compressed"]
+            if "source_map_full" in data:
+                evm["sourceMapFull"] = data["source_map"]
 
     return output_dict
 
diff --git a/vyper/compiler/__init__.py b/vyper/compiler/__init__.py
--- a/vyper/compiler/__init__.py
+++ b/vyper/compiler/__init__.py
@@ -36,6 +36,7 @@
     "abi": output.build_abi_output,
     "asm": output.build_asm_output,
     "source_map": output.build_source_map_output,
+    "source_map_full": output.build_source_map_output,
     # requires bytecode
     "bytecode": output.build_bytecode_output,
     "bytecode_runtime": output.build_bytecode_runtime_output,


Test patch:
diff --git a/tests/cli/vyper_json/test_output_dict.py b/tests/cli/vyper_json/test_output_dict.py
--- a/tests/cli/vyper_json/test_output_dict.py
+++ b/tests/cli/vyper_json/test_output_dict.py
@@ -31,6 +31,7 @@ def test_keys():
                 "object": data["bytecode_runtime"],
                 "opcodes": data["opcodes_runtime"],
                 "sourceMap": data["source_map"]["pc_pos_map_compressed"],
+                "sourceMapFull": data["source_map_full"],
             },
             "methodIdentifiers": data["method_identifiers"],
         },
Repository: vyperlang/vyper

Issue:
unable to use vyper-serve 0.3.6
### Version Information

* vyper Version (output of `vyper --version`): 0.3.6
* OS: ubutu
* Python Version 3.8

### What's your issue about?

unable to use the vyper-serve api endpoint, the call always fail with an error:
`Unable to json serialize IRNode`


Discussion:
I have the same problem on macOs with 0.3.7 version:
```
127.0.0.1 - - [06/Apr/2023 11:13:00] "POST /compile HTTP/1.1" 200 -
----------------------------------------
Exception occurred during processing of request from ('127.0.0.1', 62889)
Traceback (most recent call last):
  File "/Users/ronev/.pyenv/versions/3.10.10/lib/python3.10/socketserver.py", line 683, in process_request_thread
    self.finish_request(request, client_address)
  File "/Users/ronev/.pyenv/versions/3.10.10/lib/python3.10/socketserver.py", line 360, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/Users/ronev/.pyenv/versions/3.10.10/lib/python3.10/socketserver.py", line 747, in __init__
    self.handle()
  File "/Users/ronev/.pyenv/versions/3.10.10/lib/python3.10/http/server.py", line 433, in handle
    self.handle_one_request()
  File "/Users/ronev/.pyenv/versions/3.10.10/lib/python3.10/http/server.py", line 421, in handle_one_request
    method()
  File "/Users/ronev/.local/pipx/venvs/vyper/lib/python3.10/site-packages/vyper/cli/vyper_serve.py", line 79, in do_POST
    self.wfile.write(json.dumps(response).encode())
  File "/Users/ronev/.pyenv/versions/3.10.10/lib/python3.10/json/__init__.py", line 231, in dumps
    return _default_encoder.encode(obj)
  File "/Users/ronev/.pyenv/versions/3.10.10/lib/python3.10/json/encoder.py", line 199, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/Users/ronev/.pyenv/versions/3.10.10/lib/python3.10/json/encoder.py", line 257, in iterencode
    return _iterencode(o, 0)
  File "/Users/ronev/.pyenv/versions/3.10.10/lib/python3.10/json/encoder.py", line 179, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type IRnode is not JSON serializable
```


Resolving patch:
diff --git a/vyper/cli/vyper_serve.py b/vyper/cli/vyper_serve.py
--- a/vyper/cli/vyper_serve.py
+++ b/vyper/cli/vyper_serve.py
@@ -97,6 +97,7 @@ def _compile(self, data):
                 evm_version=data.get("evm_version", DEFAULT_EVM_VERSION),
             )[""]
             out_dict["ir"] = str(out_dict["ir"])
+            out_dict["ir_runtime"] = str(out_dict["ir_runtime"])
         except VyperException as e:
             return (
                 {"status": "failed", "message": str(e), "column": e.col_offset, "line": e.lineno},


Test patch:
Repository: vyperlang/vyper

Issue:
Bug: compiler dislikes `x not in [a, b]` in 0.3.8, whereas it was fine in 0.3.7
### Version Information

* vyper Version (output of `vyper --version`): 0.3.8
* OS: osx
* Python Version (output of `python --version`): 3.10.4

### What's your issue about?

<img width="705" alt="image" src="https://user-images.githubusercontent.com/11488427/230437774-c3b68030-9319-4169-b344-dbb470002102.png">




Discussion:
got it. in the future, it will be very helpful to please include a repro (text, that can be copy-pasted)

Resolving patch:
diff --git a/vyper/semantics/environment.py b/vyper/semantics/environment.py
--- a/vyper/semantics/environment.py
+++ b/vyper/semantics/environment.py
@@ -57,12 +57,7 @@ def get_constant_vars() -> Dict:
     return result
 
 
-# Not sure this is necessary, but add an ad-hoc type for `self` for clarity
-class _SelfT(AddressT):
-    pass
-
-
-MUTABLE_ENVIRONMENT_VARS: Dict[str, type] = {"self": _SelfT}
+MUTABLE_ENVIRONMENT_VARS: Dict[str, type] = {"self": AddressT}
 
 
 def get_mutable_vars() -> Dict:


Test patch:
Repository: vyperlang/vyper

Issue:
Deprecation warning for `selfdestruct` usage
Given the current discussions and plans (see e.g. [EIP-4758](https://eips.ethereum.org/EIPS/eip-4758) or [EIP-6046](https://eips.ethereum.org/EIPS/eip-6046)), I feel like the compiler should start issuing a deprecation warning like: 

```bash
Warning: `selfdestruct` has been deprecated. The underlying opcode will eventually undergo breaking changes, and its use is not recommended.
```


Discussion:

Resolving patch:
diff --git a/vyper/builtins/functions.py b/vyper/builtins/functions.py
--- a/vyper/builtins/functions.py
+++ b/vyper/builtins/functions.py
@@ -1238,9 +1238,14 @@ class SelfDestruct(BuiltinFunction):
     _inputs = [("to", AddressT())]
     _return_type = None
     _is_terminus = True
+    _warned = False
 
     @process_inputs
     def build_IR(self, expr, args, kwargs, context):
+        if not self._warned:
+            vyper_warn("`selfdestruct` is deprecated! The opcode is no longer recommended for use.")
+            self._warned = True
+
         context.check_is_not_constant("selfdestruct", expr)
         return IRnode.from_list(
             ["seq", eval_once_check(_freshname("selfdestruct")), ["selfdestruct", args[0]]]


Test patch:
Repository: vyperlang/vyper

Issue:
Usage of kwargs not prevented for `range(N,M)` or `range(x,x+N)`  
### Version Information

* vyper Version (output of `vyper --version`): 0.3.10+commit.855f7349
* OS: OSX
* Python Version (output of `python --version`): 3.11.4

### What's your issue about?

Using the keyword argument `bound` for ranges on the form `range(N, M)` and `range(x, x + N)` is not syntactically forbidden. The generated bytecode of the following examples is identical to the one that would have been generated without having the `bound` keyword.

```Vyper
@external
def bar():
    for i in range(1,2,bound=2):
        pass
```
```Vyper
@external
def bar():
    x:uint256 = 1
    for i in range(x,x+1,bound=2):
        pass
```

### How can it be fixed?

Only allow ranges on the form `range(N)` to have kwargs.


Discussion:

Resolving patch:
diff --git a/vyper/semantics/analysis/local.py b/vyper/semantics/analysis/local.py
--- a/vyper/semantics/analysis/local.py
+++ b/vyper/semantics/analysis/local.py
@@ -346,10 +346,11 @@ def visit_For(self, node):
                 raise IteratorException(
                     "Cannot iterate over the result of a function call", node.iter
                 )
-            validate_call_args(node.iter, (1, 2), kwargs=["bound"])
+            range_ = node.iter
+            validate_call_args(range_, (1, 2), kwargs=["bound"])
 
-            args = node.iter.args
-            kwargs = {s.arg: s.value for s in node.iter.keywords or []}
+            args = range_.args
+            kwargs = {s.arg: s.value for s in range_.keywords or []}
             if len(args) == 1:
                 # range(CONSTANT)
                 n = args[0]
@@ -371,6 +372,13 @@ def visit_For(self, node):
                     type_list = get_common_types(n, bound)
 
             else:
+                if range_.keywords:
+                    raise StructureException(
+                        "Keyword arguments are not supported for `range(N, M)` and"
+                        "`range(x, x + N)` expressions",
+                        range_.keywords[0],
+                    )
+
                 validate_expected_type(args[0], IntegerT.any())
                 type_list = get_common_types(*args)
                 if not isinstance(args[0], vy_ast.Constant):


Test patch:
diff --git a/tests/parser/syntax/test_for_range.py b/tests/parser/syntax/test_for_range.py
--- a/tests/parser/syntax/test_for_range.py
+++ b/tests/parser/syntax/test_for_range.py
@@ -12,7 +12,26 @@ def foo():
         pass
     """,
         StructureException,
-    )
+    ),
+    (
+        """
+@external
+def bar():
+    for i in range(1,2,bound=2):
+        pass
+    """,
+        StructureException,
+    ),
+    (
+        """
+@external
+def bar():
+    x:uint256 = 1
+    for i in range(x,x+1,bound=2):
+        pass
+    """,
+        StructureException,
+    ),
 ]
Repository: vyperlang/vyper

Issue:
'metadata' output selection is not supported with standard JSON
### Version Information

* vyper Version (output of `vyper --version`): 0.3.9
* OS: osx
* Python Version (output of `python --version`): 3.11.4

### What's your issue about?

The function metadata can be requested with `vyper -f metadata`, but not with standard JSON.
If I add 'metadata' to the standard JSON output selection, I see the following error:
```
[{"message":"Invalid outputSelection - 'metadata'"}]
```

### How can it be fixed?

Add the `metadata` output selection to standard JSON.



Discussion:

Resolving patch:
diff --git a/vyper/cli/vyper_json.py b/vyper/cli/vyper_json.py
--- a/vyper/cli/vyper_json.py
+++ b/vyper/cli/vyper_json.py
@@ -29,7 +29,7 @@
     "interface": "interface",
     "ir": "ir_dict",
     "ir_runtime": "ir_runtime_dict",
-    # "metadata": "metadata",  # don't include  in "*" output for now
+    "metadata": "metadata",
     "layout": "layout",
     "userdoc": "userdoc",
 }
diff --git a/vyper/compiler/output.py b/vyper/compiler/output.py
--- a/vyper/compiler/output.py
+++ b/vyper/compiler/output.py
@@ -104,7 +104,6 @@ def build_ir_runtime_dict_output(compiler_data: CompilerData) -> dict:
 
 
 def build_metadata_output(compiler_data: CompilerData) -> dict:
-    warnings.warn("metadata output format is unstable!")
     sigs = compiler_data.function_signatures
 
     def _var_rec_dict(variable_record):


Test patch:
diff --git a/tests/cli/vyper_json/test_output_selection.py b/tests/cli/vyper_json/test_output_selection.py
--- a/tests/cli/vyper_json/test_output_selection.py
+++ b/tests/cli/vyper_json/test_output_selection.py
@@ -52,3 +52,9 @@ def test_solc_style():
     input_json = {"settings": {"outputSelection": {"foo.vy": {"": ["abi"], "foo.vy": ["ir"]}}}}
     sources = {"foo.vy": ""}
     assert get_input_dict_output_formats(input_json, sources) == {"foo.vy": ["abi", "ir_dict"]}
+
+
+def test_metadata():
+    input_json = {"settings": {"outputSelection": {"*": ["metadata"]}}}
+    sources = {"foo.vy": ""}
+    assert get_input_dict_output_formats(input_json, sources) == {"foo.vy": ["metadata"]}
Repository: vyperlang/vyper

Issue:
update sphinx version
we are on https://github.com/vyperlang/vyper/blob/9cf66c9dd12c9a020c6945c100cc1266be262ebe/requirements-docs.txt#L1 but the latest version is v7.2.6 - https://pypi.org/project/Sphinx/


Discussion:
I would like to give a try ✋🏻 

Resolving patch:
diff --git a/docs/conf.py b/docs/conf.py
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -56,7 +56,7 @@
 
 # General information about the project.
 project = "Vyper"
-copyright = "2017-2020 CC-BY-4.0 Vyper Team"
+copyright = "2017-2024 CC-BY-4.0 Vyper Team"
 author = "Vyper Team (originally created by Vitalik Buterin)"
 
 # The version info for the project you're documenting, acts as replacement for
@@ -190,5 +190,5 @@
 intersphinx_mapping = {
     "brownie": ("https://eth-brownie.readthedocs.io/en/stable", None),
     "pytest": ("https://docs.pytest.org/en/latest/", None),
-    "python": ("https://docs.python.org/3.8/", None),
+    "python": ("https://docs.python.org/3.10/", None),
 }


Test patch:
Repository: vyperlang/vyper

Issue:
`payable` decorator in interface functions not enforced by `implements`
### Version Information

* vyper Version (output of `vyper --version`): `0.3.11+commit.819de669`
* OS: `linux`
* Python Version (output of `python --version`): `3.11.3`

### What's your issue about?

If an interface function (in a `.vyi` file) is marked as `payable`, it is not enforced via `implements` keyword.

#### Example

```vy
# TestI.vyi
@external
@payable
def foo() -> uint256:
    ...
```

```vy
# Test.vy
import TestI as testI
implements: testI

@external
def foo() -> uint256:
    return 0
```

```console
vyper Test.vy
```

```console
0x61002661000f6000396100266000f35f3560e01c63c2985578811861001e5734610022575f60405260206040f35b5f5ffd5b5f80fd8418268000a16576797065728300030b001
```

This should not compile actually.

### How can it be fixed?

Enforce `payable` decorator via `implements` keyword.



Discussion:

Resolving patch:
diff --git a/vyper/semantics/types/function.py b/vyper/semantics/types/function.py
--- a/vyper/semantics/types/function.py
+++ b/vyper/semantics/types/function.py
@@ -480,10 +480,7 @@ def implements(self, other: "ContractFunctionT") -> bool:
         if return_type and not return_type.compare_type(other_return_type):  # type: ignore
             return False
 
-        if self.mutability > other.mutability:
-            return False
-
-        return True
+        return self.mutability == other.mutability
 
     @cached_property
     def default_values(self) -> dict[str, vy_ast.VyperNode]:


Test patch:
diff --git a/tests/functional/syntax/test_interfaces.py b/tests/functional/syntax/test_interfaces.py
--- a/tests/functional/syntax/test_interfaces.py
+++ b/tests/functional/syntax/test_interfaces.py
@@ -210,6 +210,50 @@ def approve(_spender : address, _value : uint256) -> bool:
     """,
         InterfaceViolation,
     ),
+    (
+        # `payable` decorator not implemented
+        """
+interface testI:
+    def foo() -> uint256: payable
+
+implements: testI
+
+@external
+def foo() -> uint256:
+    return 0
+    """,
+        InterfaceViolation,
+    ),
+    (
+        # decorators must be strictly identical
+        """
+interface Self:
+    def protected_view_fn() -> String[100]: nonpayable
+
+implements: Self
+
+@external
+@pure
+def protected_view_fn() -> String[100]:
+    return empty(String[100])
+    """,
+        InterfaceViolation,
+    ),
+    (
+        # decorators must be strictly identical
+        """
+interface Self:
+    def protected_view_fn() -> String[100]: view
+
+implements: Self
+
+@external
+@pure
+def protected_view_fn() -> String[100]:
+    return empty(String[100])
+    """,
+        InterfaceViolation,
+    ),
 ]
Repository: vyperlang/vyper

Issue:
await kw displayed to end users when error reporting
### Version Information

* vyper Version (output of `vyper --version`): `0.4.0b6+commit.a9ee6414`

### What's your issue about?
```vyper
@external
def foo():
    s: String[2] = staticcall staticcall concat('a', 'b')
    return
```

```
  File "<unknown>", line 4
    s: String[2] = await      await      concat('a', 'b')
                              ^^^^^
SyntaxError: invalid syntax

The above exception was the direct cause of the following exception:

vyper.exceptions.SyntaxException: invalid syntax (<unknown>, line 4)

  line 4:31 
       3 def foo():
  ---> 4     s: String[2] = staticcall staticcall concat('a', 'b')
  --------------------------------------^
       5     return
```

esp see: `    s: String[2] = await      await      concat('a', 'b')`



Discussion:

Resolving patch:
diff --git a/vyper/ast/parse.py b/vyper/ast/parse.py
--- a/vyper/ast/parse.py
+++ b/vyper/ast/parse.py
@@ -60,7 +60,7 @@ def parse_to_ast_with_settings(
         py_ast = python_ast.parse(python_source)
     except SyntaxError as e:
         # TODO: Ensure 1-to-1 match of source_code:reformatted_code SyntaxErrors
-        raise SyntaxException(str(e), vyper_source, e.lineno, e.offset) from e
+        raise SyntaxException(str(e), vyper_source, e.lineno, e.offset) from None
 
     # Add dummy function node to ensure local variables are treated as `AnnAssign`
     # instead of state variables (`VariableDecl`)


Test patch: