Skip to content

Commit 2f7933f

Browse files
Add test for #9729
1 parent 07318f9 commit 2f7933f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/functional/i/iterable_context.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,3 +198,10 @@ def __getattr__(self, attr):
198198

199199
# Regression test for https://github.com/pylint-dev/pylint/issues/6372
200200
string_twos = "".join(str(*y) for _, *y in [[1, 2], [1, 2]])
201+
202+
# Regression test for https://github.com/pylint-dev/pylint/issues/9729
203+
class Model:
204+
field: list[int] | None = None
205+
206+
def method(self):
207+
return [f + 1 for f in self.field] if self.field else None

0 commit comments

Comments
 (0)