python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
How do I get Pylance's type checking to work with this Pydantic example?
I'm discovering Pydantic and I see this in an example (https://pydantic-docs.helpmanual.io/usage/models/#recursive-models):
from pydantic import BaseModel
class Foo(BaseModel):
count: int
siz...
lapraswastaken
Votes: 0
Answers: 1
Vscode how to disable type annotation in pylance
I recently switched to vscode for python but I'm having a bit of trouble with overzealous completions in pylance.
Specially with function overrides, pylance seems to just automatically infer the types...
kale hops
Votes: 0
Answers: 2
Pylance - Type of pandas method is partially unknown
If I try to validate code that uses pandas methodes with pylance in strict mode, I get a validation error.
import pandas as pd
ser: pd.Series[float] = pd.Series([.1, .2, .5, .3])
print(ser.max())
Py...
AlexanderP
Votes: 0
Answers: 1
Python Generics: cannot be assigned to declared type "T@func"
I'm trying to introduce Generic typing to a function of mine, but am getting a pylance error of:
Expression of type "A" cannot be assigned to declared type "T@func"
Type "A&...
dvreed77
Votes: 0
Answers: 1