-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Labels
priority: regressionSomething that worked before doesn't work anymoreSomething that worked before doesn't work anymorestubs: false positiveType checkers report false errorsType checkers report false errors
Description
Consider the following file:
import shutil
shutil.rmtree("abcd")If I run pyright 1.1.366 on it, it reports an error:
❯ pyright --version
pyright 1.1.366
❯ pyright test.py --pythonversion 3.12
/Users/winston/temp/test.py
/Users/winston/temp/test.py:3:8 - error: The function "rmtree" is deprecated
The `onerror` parameter is deprecated and will be removed in Python 3.14. Use `onexc` instead. (reportDeprecated)
1 error, 0 warnings, 0 informations
However, I was not able to reproduce the issue using mypy (the custom typeshed dir was a git clone of this repository at main, b3fc7e2):
❯ mypy --python-version 3.12 --custom-typeshed-dir typeshed test.py
Success: no issues found in 1 source file
I originally filed this issue on the pyright repository (microsoft/pyright#8087), but was told that pyright is working correctly. If that's the case, that would mean it's an issue with shutil.pyi type stub.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
priority: regressionSomething that worked before doesn't work anymoreSomething that worked before doesn't work anymorestubs: false positiveType checkers report false errorsType checkers report false errors