-
Notifications
You must be signed in to change notification settings - Fork 281
Closed
Labels
good first issueGood for newcomersGood for newcomers
Description
Describe the Bug
When using a __builtins__.pyi file, functions named simply _ aren't properly recognized, unlike other functions:
# test.py
gettext("a")
_("b")# __builtins__.pyi
def gettext(message: str) -> str: ...
def _(message: str) -> str: ...$ pyrefly check
INFO Checking current directory with default configuration
ERROR Could not find name `_` [unknown-name]
--> test.py:2:1
|
2 | _("b")
| ^
|
INFO 1 error
Pyright handles this correctly:
$ pyright
0 errors, 0 warnings, 0 informations
Aliasing gettext to _ is a common thing to do, so it would be useful if this were supported.
Sandbox Link
(Only applicable for extension issues) IDE Information
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomers