Strange signature handling
Describe the Bug
Sandbox Link
No response
(Only applicable for extension issues) IDE Information
No response
that is one crazy signature, haha.
would this formatting look good to you if we made it on new lines for each param?
(
start: _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool] | float64 | integer[Any]]]] | _NestedSequence[float] | _SupportsArray[dtype[numpy.bool[builtins.bool] | float64 | integer[Any]]] | float,
stop: _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool] | float64 | integer[Any]]]] | _NestedSequence[float] | _SupportsArray[dtype[numpy.bool[builtins.bool] | float64 | integer[Any]]] | float,
num: SupportsIndex = 50,
endpoint: builtins.bool = True,
retstep: Literal[False] = False,
dtype: None = None,
axis: SupportsIndex = 0,
*,
device: Literal['cpu'] | None = None
) -> ndarray[tuple[Any, ...], dtype[float64]]
I think there must be a renderer that convert this signature info as markdown to get pretty docs similar to "pyright" or "pylsp"
Another thing is huge amount of ram consuming ~2G for lsp. I think its not efficient for laptops or arm devices
Another thing is huge amount of ram consuming ~2G for lsp. I think its not efficient for laptops or arm devices
would you be able to share your project so we can look into memory usage? which version are you on? we have improved it a lot, but there are still problems.
if you want to put the details here that would be appreciated!
Since #1092 is closed, i put info here.
version = 0.41.0 (recent updated from 0.40.0) cpu = i7-6700K os = Arch Linux
The current ram consumption is about ~1.6G with helix editor default config for pyrefly
Since #1092 is closed, i put info here.
version = 0.41.0 (recent updated from 0.40.0) cpu = i7-6700K os = Arch Linux
The current ram consumption is about ~1.6G with helix editor default config for pyrefly
do you have a link to the project you're using pyrefly with?
No there is no special project i have right now, i test pyrefly as lsp for neovim
No there is no special project i have right now, i test pyrefly as lsp for neovim
so what files did you open to cause the memory use?
A simple 50 line python scripts, even on empty scripts when lsp gets activated the ram goes up
A simple 50 line python scripts, even on empty scripts when lsp gets activated the ram goes up
what kind of python environment? what do you import? large site-packages in your python interpreter? (pyrefly sometimes looks at your dependencies but we have gotten better about it).
Global os environment
I can reproduce this with the following:
- pip list with lots of dependencies
(test) PS C:\Users\kylei\projects\test> uv pip list
Package Version
------------------------ -----------
boto3 1.37.38
botocore 1.37.38
filelock 3.16.1
fsspec 2025.3.0
googleapis-common-protos 1.72.0
grpcio 1.70.0
grpcio-status 1.70.0
jinja2 3.1.6
jmespath 1.0.1
markupsafe 2.1.5
mpmath 1.3.0
networkx 3.1
numpy 1.24.4
pandas 2.0.3
protobuf 5.29.5
python-dateutil 2.9.0.post0
pytz 2025.2
s3transfer 0.11.5
setuptools 75.3.2
six 1.17.0
sympy 1.13.3
torch 2.4.1
typing-extensions 4.13.2
tzdata 2025.2
urllib3 1.26.20
- open empty file, no ram (<130mb)
- autocomplete import
- ram goes to 1.2gb
@kinto0 can i work on this !!!!!
I've spun the memory issue out into https://github.com/facebook/pyrefly/issues/1547.
This issue has someone assigned, but has not had recent activity for more than 2 weeks.
If you are still working on this issue, please add a comment so everyone knows. Otherwise, please unassign yourself and allow someone else to take over.
Thank you for your contributions!