mirror of
https://github.com/github/codeql.git
synced 2025-12-20 02:44:30 +01:00
Should fix #2426. Essentially, we disregard expressions used inside annotations, if these annotations occur in a file that has `from __future__ import annotations`, as this prevents the annotations from being evaluated.
10 lines
161 B
Python
10 lines
161 B
Python
import dataclasses
|
|
import typing
|
|
|
|
import module3
|
|
|
|
@dataclasses.dataclass()
|
|
class Bar:
|
|
def is_in_foo(self, foo: module3.Foo):
|
|
return self in foo.bars
|