Skip to content

Conversation

@donbarbos
Copy link
Contributor

Closes: #15172
Diff: https://github.com/giampaolo/psutil/compare/release-7.1.3..release-7.2.0

Due to the inability to detect some platforms, I decided to leave their real named tuples in _ps[bsd,aix,sunos].pyi so that at least the correct types would be there

@github-actions
Copy link
Contributor

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

core (https://github.com/home-assistant/core)
+ homeassistant/components/systemmonitor/util.py:6: error: Module "psutil._common" has no attribute "sfan"  [attr-defined]
+ homeassistant/components/systemmonitor/util.py:6: error: Module "psutil._common" has no attribute "shwtemp"  [attr-defined]
+ homeassistant/components/systemmonitor/util.py:89: error: Returning Any from function declared to return "float | None"  [no-any-return]
+ homeassistant/components/systemmonitor/coordinator.py:12: error: Module "psutil._common" has no attribute "sbattery"  [attr-defined]
+ homeassistant/components/systemmonitor/coordinator.py:12: error: Module "psutil._common" has no attribute "sdiskusage"  [attr-defined]
+ homeassistant/components/systemmonitor/coordinator.py:12: error: Module "psutil._common" has no attribute "shwtemp"  [attr-defined]
+ homeassistant/components/systemmonitor/coordinator.py:12: error: Module "psutil._common" has no attribute "snetio"  [attr-defined]
+ homeassistant/components/systemmonitor/coordinator.py:12: error: Module "psutil._common" has no attribute "snicaddr"  [attr-defined]
+ homeassistant/components/systemmonitor/coordinator.py:12: error: Module "psutil._common" has no attribute "sswap"  [attr-defined]
+ homeassistant/components/systemmonitor/sensor.py:94: error: Returning Any from function declared to return "float | None"  [no-any-return]
+ homeassistant/components/systemmonitor/sensor.py:102: error: Returning Any from function declared to return "float | None"  [no-any-return]
+ homeassistant/components/systemmonitor/sensor.py:140: error: Returning Any from function declared to return "str | None"  [no-any-return]

@donbarbos
Copy link
Contributor Author

donbarbos commented Dec 25, 2025

mypy_primer output (including Returning Any from function ...) is related to the fact that the named tuples were moved to _ntuples.pyi

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.

1 participant