BoboTiG / python-mss

An ultra fast cross-platform multiple screenshots module in pure Python using ctypes.
https://pypi.org/project/mss/
MIT License
998 stars 88 forks source link

Mac: support macOS Big Sur (fixes #178) #189

Closed BoboTiG closed 3 years ago

BoboTiG commented 3 years ago

Changes proposed in this PR

It is very important to keep up to date tests and documentation.

Is your code right?

sourcery-ai[bot] commented 3 years ago

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 1.10 ⭐ 1.14 ⭐ 0.04 👎
Method Length 57.26 ⭐ 57.32 ⭐ 0.06 👎
Working memory 7.16 🙂 7.19 🙂 0.03 👎
Quality 82.29% 82.18% -0.11% 👎
Other metrics Before After Change
Lines 1128 1145 17
Changed files Quality Before Quality After Quality Change
mss/base.py 89.39% ⭐ 89.39% ⭐ 0.00%
mss/darwin.py 78.46% ⭐ 78.98% ⭐ 0.52% 👍
mss/linux.py 66.52% 🙂 66.52% 🙂 0.00%
mss/screenshot.py 90.16% ⭐ 90.16% ⭐ 0.00%
mss/tests/test_gnu_linux.py 86.48% ⭐ 86.44% ⭐ -0.04% 👎
mss/tests/test_macos.py 77.88% ⭐ 75.19% ⭐ -2.69% 👎

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

File Function Complexity Length Working Memory Quality Recommendation
mss/base.py MSSBase.save 14 🙂 145 😞 13 😞 45.03% 😞 Try splitting into smaller methods. Extract out complex expressions
mss/darwin.py MSS._grab_impl 6 ⭐ 191 😞 15 😞 45.30% 😞 Try splitting into smaller methods. Extract out complex expressions
mss/linux.py MSS._set_cfunctions 1 ⭐ 244 ⛔ 12 😞 50.96% 🙂 Try splitting into smaller methods. Extract out complex expressions
mss/darwin.py MSS._monitors_impl 3 ⭐ 177 😞 13 😞 52.10% 🙂 Try splitting into smaller methods. Extract out complex expressions
mss/linux.py MSS._monitors_impl 3 ⭐ 137 😞 14 😞 54.74% 🙂 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.