-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat: add guild configuration command #78
Conversation
This PR is being deployed to Railway 🚅 |
1 similar comment
This PR is being deployed to Railway 🚅 |
This PR is being deployed to Railway 🚅 byte: ◻️ REMOVED |
got it working in c50435c |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @JacobCoffee - I've reviewed your changes and they look great!
General suggestions:
- Consider adding comments to explain the use of specific linting rule exceptions for future maintainability.
- Refactor the logging configuration to reduce repetition and simplify future modifications.
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟡 Complexity: 1 issue found
- 🟢 Docstrings: all looks good
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? ✨
self.__cog_name__ = "Config Commands" | ||
self.config_options = config_options | ||
|
||
async def _config_autocomplete(self, interaction: Interaction, current: str) -> list[Choice[str]]: # noqa: ARG002 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion (code_clarification): The use of # noqa: ARG002
to bypass a specific linting rule is understandable in certain contexts, but it's generally a good practice to include a brief comment explaining why this exception is necessary here for future maintainers.
async def _config_autocomplete(self, interaction: Interaction, current: str) -> list[Choice[str]]: # noqa: ARG002 | |
async def _config_autocomplete(self, interaction: Interaction, current: str) -> list[Choice[str]]: # noqa: ARG002 | |
# noqa: ARG002 is used here to bypass a linting rule specific to argument types in async functions. | |
# This exception is necessary due to the unique requirements of Discord's interaction and choice structures. |
src/byte/lib/log.py
Outdated
@@ -72,6 +72,16 @@ def setup_logging() -> None: | |||
"handlers": ["console", "file"], | |||
"propagate": False, | |||
}, | |||
"httpcore": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue (complexity): The addition of httpcore
and httpx
loggers to the logging configuration certainly enhances the logging capabilities of our application. However, this approach introduces a pattern of repetition for each logger configuration, which could potentially make future modifications or additions more cumbersome. To streamline the maintenance of our logging configuration and reduce repetition, consider refactoring the logger setup to be more dynamic. For instance, you could create a list of tuples containing the logger names and their respective log levels, and then generate the logger configurations in a loop. This would not only reduce the amount of code but also simplify the process of adding or modifying loggers in the future.
* feat: add guild configuration command * feat: add litestar office hours command * fix: centralize options for slashcmd and dropdown * ci: apply pre-commit * chore: dependecy updates * chore: clean up utils * fix: move moved import * fix: attempt to fix broken modal submission * feat: finalize working config selection and sub selections * ci: for some reason pre-commit is stupid and changed every fucking file
* feat: add guild configuration command * feat: add litestar office hours command * fix: centralize options for slashcmd and dropdown * ci: apply pre-commit * chore: dependecy updates * chore: clean up utils * fix: move moved import * fix: attempt to fix broken modal submission * feat: finalize working config selection and sub selections * ci: for some reason pre-commit is stupid and changed every fucking file
Pull Request Checklist
Description
Close Issue(s)