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

small doc fixes #380

Merged
merged 2 commits into from Apr 15, 2024
Merged

small doc fixes #380

merged 2 commits into from Apr 15, 2024

Conversation

joamatab
Copy link
Contributor

No description provided.

@github-actions github-actions bot added the bug Something isn't working label Apr 14, 2024
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.

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

Here's what I looked at during the review
  • 🟡 General issues: 1 issue 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.

if rdb_path.is_dir():
for rdb_file in rdb_path.glob("*.rdb"):
errors_dict[rdb_file.stem] = count_drc(rdb_file)
if not rdb_path.is_dir():
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion (code_refinement): Consider simplifying the conditional structure for readability.

The nested conditionals could be streamlined by handling the directory check and file processing in separate functions or by restructuring the logic.

Suggested change
if not rdb_path.is_dir():
def handle_directory_check(rdb_path):
if not rdb_path.is_dir():
return _get_errors(rdb_path, threshold, errors_dict)
return None
# Usage in your existing code
error_check = handle_directory_check(rdb_path)
if error_check is not None:
return error_check

@joamatab joamatab merged commit de3da46 into main Apr 15, 2024
14 checks passed
@joamatab joamatab deleted the fix_docs branch April 15, 2024 01:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant