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

Docstrings & Fixed dependencies #2

Merged
merged 2 commits into from
Feb 9, 2024
Merged

Docstrings & Fixed dependencies #2

merged 2 commits into from
Feb 9, 2024

Conversation

Xmaster6y
Copy link
Owner

No description provided.

Copy link
Contributor

@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: Refactoring

PR Summary: This pull request focuses on refactoring the handling of optional dependencies within the lczerolens utility module, specifically targeting the LCZero bindings. It introduces a more graceful error handling mechanism by moving the import statement for LCZero backends inside a try-except block to catch ImportError exceptions. Additionally, it modifies the error message to provide a more informative guidance for users on how to resolve the missing dependency. Another change noted is in the visualisation.py file, where a TODO comment has been added, suggesting a future action to remove the file.

Decision: Comment

📝 Type: 'Refactoring' - 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:

  • Consider reviewing the entire error handling strategy for optional dependencies across the project to ensure consistency and clarity in user guidance.
  • It might be beneficial to add more context or documentation around the decision to potentially remove the visualisation.py file, as indicated by the TODO comment. Understanding the rationale behind such decisions can be valuable for maintainers or contributors who are not directly involved in the current changes.
  • Given the nature of the changes, it would be prudent to ensure that all affected parts of the application are tested thoroughly to prevent any unforeseen issues due to the refactoring of the import statements.
  • The grammatical error in the error message was a minor oversight but highlights the importance of careful review of user-facing messages for professionalism and clarity.

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.

src/lczerolens/utils/lczero.py Outdated Show resolved Hide resolved
@Xmaster6y Xmaster6y merged commit cb2095f into main Feb 9, 2024
1 check passed
@Xmaster6y Xmaster6y deleted the doc branch February 9, 2024 17:47
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.

1 participant