dmamontov / esphome-blekeyboard

ESPHome BLE Keyboard
https://community.home-assistant.io/t/esphome-ble-keyboard/
84 stars 16 forks source link

Addition of Release specific Key #22

Open laptopfreek0 opened 1 year ago

laptopfreek0 commented 1 year ago
sourcery-ai[bot] commented 1 year ago

Sourcery Code Quality Report

❌  Merging this PR will decrease code quality in the affected files by 0.41%.

Quality metrics Before After Change
Complexity 1.38 ⭐ 1.64 ⭐ 0.26 👎
Method Length 177.62 😞 184.08 😞 6.46 👎
Working memory 12.84 😞 12.60 😞 -0.24 👍
Quality 63.71% 🙂 63.30% 🙂 -0.41% 👎
Other metrics Before After Change
Lines 1044 1061 17
Changed files Quality Before Quality After Quality Change
components/ble_keyboard/__init__.py 74.47% 🙂 73.12% 🙂 -1.35% 👎
components/ble_keyboard/const.py 35.25% 😞 35.25% 😞 0.00%

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

File Function Complexity Length Working Memory Quality Recommendation
components/ble_keyboard/__init__.py ble_keyboard_release_to_code 4 ⭐ 129 😞 8 🙂 65.57% 🙂 Try splitting into smaller methods
components/ble_keyboard/__init__.py ble_keyboard_press_to_code 2 ⭐ 125 😞 8 🙂 68.04% 🙂 Try splitting into smaller methods
components/ble_keyboard/__init__.py ble_keyboard_combination_to_code 0 ⭐ 132 😞 8 🙂 69.20% 🙂 Try splitting into smaller methods

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!

Help us improve this quality report!