jabesq / netatmo-api-python

Simple API to access Netatmo weather station data from any python script (for Netatmo information, see www.netatmo.com)
MIT License
10 stars 34 forks source link

Fix missing station modules #152

Closed cgtobi closed 3 years ago

cgtobi commented 3 years ago

Related thread: https://community.home-assistant.io/t/netatmo-outdoor-do-not-show-up/247039

sourcery-ai[bot] commented 3 years ago

Sourcery Code Quality Report

✅  Merging this PR will increase code quality in the affected files by 0.18%.

Quality metrics Before After Change
Complexity 10.11 🙂 9.89 🙂 -0.22 👍
Method Length 63.24 🙂 63.87 🙂 0.63 👎
Working memory 9.76 🙂 9.79 🙂 0.03 👎
Quality 61.26% 🙂 61.44% 🙂 0.18% 👍
Other metrics Before After Change
Lines 1294 1331 37
Changed files Quality Before Quality After Quality Change
src/pyatmo/camera.py 60.29% 🙂 60.29% 🙂 0.00%
src/pyatmo/weather_station.py 57.07% 🙂 57.80% 🙂 0.73% 👍
tests/test_pyatmo_weatherstation.py 73.81% 🙂 73.63% 🙂 -0.18% 👎

Here are some functions in these files that still need a tune-up:

File Function Complexity Length Working Memory Quality Recommendation
src/pyatmo/camera.py CameraData.__init__ 24 😞 314 ⛔ 14 😞 25.60% 😞 Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
src/pyatmo/weather_station.py WeatherStationData.__init__.get_module_names.get_modules.get_monitored_conditions.get_last_data 19 😞 217 ⛔ 12 😞 36.39% 😞 Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
src/pyatmo/camera.py CameraData.__init__.set_state 11 🙂 141 😞 13 😞 48.08% 😞 Try splitting into smaller methods. Extract out complex expressions
src/pyatmo/weather_station.py WeatherStationData.__init__ 16 🙂 175 😞 8 🙂 49.87% 😞 Try splitting into smaller methods
src/pyatmo/camera.py CameraData.__init__.update_camera_urls 13 🙂 130 😞 11 😞 50.89% 🙂 Try splitting into smaller methods. Extract out complex expressions

Legend and Explanation

The emojis denote the absolute quality of the code:

The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request.


Please see our documentation here for details on how these metrics are calculated.

We are actively working on this report - lots more documentation and extra metrics to come!

Let us know what you think of it by mentioning @sourcery-ai in a comment.