You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As part of our project we are using wurlitzer to redirect some of the outputs into the files.
The problem I am facing is that library lacks type deduction, thus linters are trying to deduce types themselves leading to errors.
Even trying out the doc example (saved as test.py):
from io import StringIO
from wurlitzer import pipes, STDOUT
out = StringIO()
with pipes(stdout=out, stderr=STDOUT):
print("test")
stdout = out.getvalue()
When running pyright test.py
I got the following error
//:5:19 - error: Argument of type "StringIO" cannot be assigned to parameter "stdout" of type "int"
"StringIO" is incompatible with "int" (reportGeneralTypeIssues)
This is basically a feature request - I can workaround it by silencing linters and type checkers for individual lines in my code.
The text was updated successfully, but these errors were encountered:
As part of our project we are using wurlitzer to redirect some of the outputs into the files.
The problem I am facing is that library lacks type deduction, thus linters are trying to deduce types themselves leading to errors.
Even trying out the doc example (saved as
test.py
):When running
pyright test.py
I got the following error
This is basically a feature request - I can workaround it by silencing linters and type checkers for individual lines in my code.
The text was updated successfully, but these errors were encountered: