Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pixels model correction #274

Merged
merged 2 commits into from
Feb 27, 2024
Merged

Pixels model correction #274

merged 2 commits into from
Feb 27, 2024

Conversation

Andon-Li
Copy link
Contributor

@Andon-Li Andon-Li commented Feb 8, 2024

Changes proposed in this PR

ScreenShot.pixels returns a list where each element is a tuple representing a row of pixels. Each of these tuples contain "Pixel"'s. The current model incorrectly hints the return value of ScreenShot.pixels as a list containing "Pixel"s.

  • Model for Pixels changed to reflect the true nature of the data

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

  • Tests added/updated
  • Documentation updated

Is your code right?

  • PEP8 compliant
  • flake8 passed

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Type: Enhancement

PR Summary: The pull request aims to correct the model for the Pixels data structure in the src/mss/models.py file. The correction reflects the actual data returned by ScreenShot.pixels, which is a list where each element is a tuple representing a row of pixels, with each tuple containing multiple Pixel instances. This change ensures that the type hinting accurately represents the structure of the data being handled.

Decision: Comment

📝 Type: 'Enhancement' - not supported yet.
  • Sourcery currently only approves 'Typo fix' PRs.
✅ Issue addressed: this change correctly addresses the issue or implements the desired feature.
No details provided.
📝 Complexity: the changes are too large or complex for Sourcery to approve.
  • Unsupported files: the diff contains files that Sourcery does not currently support during reviews.

General suggestions:

  • Ensure that all parts of the codebase that interact with the Pixels model are reviewed and updated if necessary to accommodate the change in its structure. This includes any functions or methods that process or manipulate the Pixels data.
  • Consider adding more detailed documentation or examples in the code or the project's documentation to illustrate the structure and intended use of the corrected Pixels model. This can help future developers understand the rationale behind the change and how to work with the updated model.
  • Review the performance implications of this change, especially if the Pixels data is used in performance-critical paths. The change from a flat list to a list of tuples may affect how the data is iterated over or manipulated.

Thanks for using Sourcery. We offer it for free for open source projects and would be very grateful if you could help us grow. If you like it, would you consider sharing Sourcery on your favourite social media? ✨

Share Sourcery

Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

@BoboTiG BoboTiG merged commit 599f86c into BoboTiG:main Feb 27, 2024
20 checks passed
@BoboTiG
Copy link
Owner

BoboTiG commented Feb 27, 2024

Thank you @Andon-Li 🍾

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants