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

Try to implement exclude-search #102

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

JakubAndrysek
Copy link
Owner

No description provided.

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 @JakubAndrysek - I've reviewed your changes and they look great!

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

@@ -40,6 +41,7 @@ class MkDoxy(BasePlugin):
"doxygen-bin-path",
config_options.Type(str, default="doxygen", required=False),
),
("exclude-search", config_options.Type(str, default=EXCLUDE_SEARCH_DISABLE, required=False)),
Copy link

Choose a reason for hiding this comment

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

issue (code_clarification): Duplicate configuration option for 'exclude-search'.

The 'exclude-search' option is defined twice in the class 'MkDoxy', once for the plugin and once for each project. Consider consolidating these if they are intended to serve the same purpose or clarify the distinction if they serve different scopes.

@@ -85,6 +88,21 @@
elif strict and len(warnings) > 0:
raise exceptions.Abort(f"Aborted with {len(warnings)} Configuration Warnings in 'strict' mode!")

checkExcludeSearch(proData.get("exclude-search", EXCLUDE_SEARCH_DISABLE), "project")
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): Potential redundancy in default value specification.

The default value for 'exclude-search' is specified again in the 'get' method, which is redundant since it's already set in the configuration definition. Consider removing the default from the 'get' method to rely on the configuration's default.

Suggested change
checkExcludeSearch(proData.get("exclude-search", EXCLUDE_SEARCH_DISABLE), "project")
checkExcludeSearch(proData.get("exclude-search"), "project")

@@ -27,7 +27,9 @@
class GeneratorBase:
"""! Base class for all generators."""

def __init__(self, templateDir: str = "", ignore_errors: bool = False, debug: bool = False):
def __init__(
self, templateDir: str = "", ignore_errors: bool = False, exclude_search: string = "no", debug: bool = False
Copy link

Choose a reason for hiding this comment

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

issue (typo): Incorrect type hint for 'exclude_search'.

The type hint for 'exclude_search' should be 'str' instead of 'string'. Python uses 'str' for string type hints.

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