mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-07 22:44:27 +08:00
Add ClassVar support for dataclass
This commit is contained in:
@@ -392,13 +392,18 @@ def test_dataclass_signature(
|
||||
"""
|
||||
name: str
|
||||
foo = 3
|
||||
blob: ClassVar[str]
|
||||
price: float
|
||||
quantity: int = 0.0
|
||||
|
||||
X("""
|
||||
)
|
||||
|
||||
code = 'from dataclasses import dataclass\n' + start + code
|
||||
code = (
|
||||
"from dataclasses import dataclass\nfrom typing import ClassVar\n"
|
||||
+ start
|
||||
+ code
|
||||
)
|
||||
|
||||
sig, = Script(code).get_signatures()
|
||||
expected_params = (
|
||||
|
||||
Reference in New Issue
Block a user