Skip to content

Commit

Permalink
Add a regression test for AttributeError for Subscript object
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-Sassoulas committed Jul 20, 2021
1 parent 970c5d2 commit 487679e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/functional/r/regression/regression_4439.py
@@ -0,0 +1,13 @@
"""AttributeError: 'Subscript' object has no attribute 'name' """
# pylint: disable=missing-docstring

from typing import Optional

from attr import attrib, attrs


@attrs()
class User:
name: str = attrib()
age: int = attrib()
occupation = Optional[str] = attrib(default=None) # [unsupported-assignment-operation]
1 change: 1 addition & 0 deletions tests/functional/r/regression/regression_4439.txt
@@ -0,0 +1 @@
unsupported-assignment-operation:13:17:User:'Optional' does not support item assignment:HIGH

0 comments on commit 487679e

Please sign in to comment.