python-mss icon indicating copy to clipboard operation
python-mss copied to clipboard

Linux: Mouse support

Open zorvios opened this issue 4 years ago • 8 comments

Changes proposed in this PR

  • Partial Fix for #55 -- Linux cursor image -- merge the cursor into the pixels directly and not only in the final PNG -- Added keyword with_cursor=False

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

  • [ ] Tests added/updated
  • [ ] Documentation updated

Is your code right?

  • [x] PEP8 compliant
  • [x] flake8 passed

zorvios avatar Oct 05 '20 01:10 zorvios

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 1.70 ⭐ 2.11 ⭐ 0.41 👎
Method Length 75.42 🙂 80.89 🙂 5.47 👎
Working memory 10.35 😞 10.23 😞 -0.12 👍
Quality 74.81% 🙂 74.15% 🙂 -0.66% 👎
Other metrics Before After Change
Lines 1093 1246 153
Changed files Quality Before Quality After Quality Change
mss/base.py 89.39% ⭐ 83.98% ⭐ -5.41% 👎
mss/darwin.py 76.20% ⭐ 78.36% ⭐ 2.16% 👍
mss/linux.py 63.18% 🙂 62.07% 🙂 -1.11% 👎
mss/windows.py 65.76% 🙂 69.56% 🙂 3.80% 👍

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.draw 18 🙂 274 ⛔ 17 ⛔ 27.76% 😞 Try splitting into smaller methods. Extract out complex expressions
mss/linux.py MSS._set_cfunctions 2 ⭐ 253 ⛔ 33 ⛔ 37.27% 😞 Try splitting into smaller methods. Extract out complex expressions
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/darwin.py MSS._set_cfunctions 1 ⭐ 135 😞 30 ⛔ 48.06% 😞 Try splitting into smaller methods. Extract out complex expressions

Legend and Explanation

The emojis denote the absolute quality of the code:

  • ⭐ excellent
  • 🙂 good
  • 😞 poor
  • ⛔ very poor

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.

sourcery-ai[bot] avatar Oct 12 '20 02:10 sourcery-ai[bot]

Hello @zorvios,

Sorry for all those code changes since your opened the PR, and a big thank you for your work 💪

I will come back to you later, I need to think about how that new feature could be implemented.

BoboTiG avatar Oct 17 '20 18:10 BoboTiG

Is this ever going to ship?

AwesomeDude091 avatar Jul 23 '21 16:07 AwesomeDude091

Is this ever going to ship?

????

AwesomeDude091 avatar Aug 16 '21 18:08 AwesomeDude091

Yay it got approved, now let's merge it and be done with it :)

AwesomeDude091 avatar Oct 12 '21 11:10 AwesomeDude091

Approved by someone who never committed to the project, it has no value ;)

Sorry, I may find some time to fully check the patch, thanks for your patience.

BoboTiG avatar Oct 12 '21 11:10 BoboTiG

Oh well that's a bummer, have fun checking it :)

AwesomeDude091 avatar Oct 12 '21 14:10 AwesomeDude091

I presume the status of this PR hasn't changed?

AwesomeDude091 avatar Feb 03 '22 16:02 AwesomeDude091