Skip to content

Added type hinting for psutil virtual memory stubs #8501

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 7, 2022

Conversation

tareqpi
Copy link
Contributor

@tareqpi tareqpi commented Aug 6, 2022

@github-actions

This comment has been minimized.

@hauntsaninja
Copy link
Collaborator

This shouldn't return Any. It returns a NamedTuple: https://psutil.readthedocs.io/en/latest/#psutil.virtual_memory

@github-actions
Copy link
Contributor

github-actions bot commented Aug 7, 2022

Diff from mypy_primer, showing the effect of this PR on open source code:

cwltool (https://github.com/common-workflow-language/cwltool)
+ cwltool/job.py:912: error: Unused "type: ignore" comment
+ cwltool/executors.py:281: error: Unused "type: ignore" comment

core (https://github.com/home-assistant/core)
- homeassistant/components/systemmonitor/sensor.py:576: error: Call to untyped function "virtual_memory" in typed context  [no-untyped-call]

Copy link
Collaborator

@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@hauntsaninja hauntsaninja merged commit d7a5a14 into python:master Aug 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Type hinting needed for 'psycopg2' and 'psutil' functions
2 participants