Skip to content

Conversation

@yammesicka
Copy link
Member

No description provided.

@yammesicka yammesicka merged commit 314ddfc into master Mar 27, 2024
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.

Hey @yammesicka - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟡 General issues: 4 issues found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Docstrings: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

Comment on lines +13 to +14
def register_test_class(file_path: str, test_class):
log.debug(f'Registering test class {test_class=}')
Copy link

Choose a reason for hiding this comment

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

suggestion (code_refinement): Consider reintroducing type hints for parameters.

Type hints were removed from the register_test_class function parameters. Reintroducing them could enhance code readability and maintain consistency.

if len(sys.argv) != 2:
if len(sys.argv) < 2:
print('python load_tests.py test-module-path') # noqa: T201
exit(-1)
Copy link

Choose a reason for hiding this comment

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

suggestion (code_refinement): Consider providing more informative error messages.

While exiting the program when the path doesn't exist is correct, providing a more informative error message or logging the error could improve user experience.

Comment on lines +77 to +78
if "-X" in sys.argv:
log.configure(handlers=[{"sink": sys.stdout, "level": "DEBUG"}])
Copy link

Choose a reason for hiding this comment

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

suggestion (code_refinement): Ensure debug mode activation is documented.

Introducing a debug mode via the '-X' command-line argument is useful. Ensure this feature is well-documented for users and developers.

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.

2 participants