Open Squixx opened 3 years ago
✅ Merging this PR will increase code quality in the affected files by 4.82%.
Quality metrics | Before | After | Change |
---|---|---|---|
Complexity | 15.07 🙂 | 13.19 🙂 | -1.88 👍 |
Method Length | 59.92 ⭐ | 47.35 ⭐ | -12.57 👍 |
Working memory | 9.23 🙂 | 8.60 🙂 | -0.63 👍 |
Quality | 52.82% 🙂 | 57.64% 🙂 | 4.82% 👍 |
Other metrics | Before | After | Change |
---|---|---|---|
Lines | 169 | 189 | 20 |
Changed files | Quality Before | Quality After | Quality Change |
---|---|---|---|
custom_components/o365/sensor.py | 52.82% 🙂 | 57.64% 🙂 | 4.82% 👍 |
Here are some functions in these files that still need a tune-up:
File | Function | Complexity | Length | Working Memory | Quality | Recommendation |
---|---|---|---|---|---|---|
custom_components/o365/sensor.py | O365QuerySensor.__init__ | 28 😞 | 309 ⛔ | 11 😞 | 28.17% 😞 | Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions |
custom_components/o365/sensor.py | O365InboxSensor.__init__ | 12 🙂 | 141 😞 | 10 😞 | 52.39% 🙂 | Try splitting into smaller methods. Extract out complex expressions |
custom_components/o365/sensor.py | setup_platform | 4 ⭐ | 96 🙂 | 10 😞 | 65.58% 🙂 | Extract out complex expressions |
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.
So the weird thing is, i can get this to sort of work (not the teams presence) on my 'produciton' machine. But I cant get even the email sensor to work on the dev container (I keep running into configuration errors)
I'd Like to add teams presence to home assistant using the account setup already provided by o365,
However i'm actually unsure on how to locally test this. I know this works upstream in the O365 lib, but i'm not familiar enough with home assistant to figure out what i'm doing wrong.
Anyone who can help?