-
Notifications
You must be signed in to change notification settings - Fork 283
Closed
Labels
needs-discussionAn issue where it's not clear whether there is a bug or we are behaving as expected.An issue where it's not clear whether there is a bug or we are behaving as expected.
Description
I have these two files:
(tmp-repo) marcogorelli@DESKTOP-U8OKFP3:~/tmp-repo$ cat foo/__init__.py
def one():
return None
(tmp-repo) marcogorelli@DESKTOP-U8OKFP3:~/tmp-repo$ cat foo/__init__.pyi
from typing import Callable
one: Callable[[], None]If I run pyrefly report foo, then I get:
{
"/home/marcogorelli/tmp-repo/foo/__init__.pyi": {
"line_count": 5,
"functions": [],
"suppressions": []
},
"/home/marcogorelli/tmp-repo/foo/__init__.py": {
"line_count": 4,
"functions": [
{
"name": "foo.one",
"return_annotation": null,
"parameters": [],
"location": {
"start": {
"line": 1,
"column": 1
},
"end": {
"line": 2,
"column": 16
}
}
}
],
"suppressions": []
}
}Note how we don't get any information for the function one in the stub file
pyright verifytypes includes:
"symbols": [
{
"category": "function",
"name": "foo.one",
"referenceCount": 1,
"isExported": true,
"isTypeKnown": true,
"isTypeAmbiguous": false,
"diagnostics": []
}
]
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
needs-discussionAn issue where it's not clear whether there is a bug or we are behaving as expected.An issue where it's not clear whether there is a bug or we are behaving as expected.