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

feat: add guild configuration command #78

Merged
merged 10 commits into from
Mar 10, 2024
Merged

Conversation

JacobCoffee
Copy link
Owner

Pull Request Checklist

  • New code has 100% test coverage
  • (If applicable) The prose documentation has been updated to reflect the changes introduced by this PR
  • (If applicable) The reference documentation has been updated to reflect the changes introduced by this PR
  • Pre-Commit Checks were ran and passed
  • Tests were ran and passed

Description

Close Issue(s)

Copy link

railway-app bot commented Mar 10, 2024

This PR is being deployed to Railway 🚅

1 similar comment
Copy link

railway-app bot commented Mar 10, 2024

This PR is being deployed to Railway 🚅

Copy link

railway-app bot commented Mar 10, 2024

This PR is being deployed to Railway 🚅

byte: ◻️ REMOVED

@JacobCoffee
Copy link
Owner Author

got it working in c50435c

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 @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? ✨

Share Sourcery

Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

self.__cog_name__ = "Config Commands"
self.config_options = config_options

async def _config_autocomplete(self, interaction: Interaction, current: str) -> list[Choice[str]]: # noqa: ARG002
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_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.

Suggested change
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.

@@ -72,6 +72,16 @@ def setup_logging() -> None:
"handlers": ["console", "file"],
"propagate": False,
},
"httpcore": {
Copy link
Contributor

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.

@JacobCoffee JacobCoffee merged commit 94f854c into guild-settings Mar 10, 2024
2 of 4 checks passed
@JacobCoffee JacobCoffee deleted the config-command branch March 10, 2024 22:14
JacobCoffee added a commit that referenced this pull request May 11, 2024
* 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
JacobCoffee added a commit that referenced this pull request Oct 11, 2024
* 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
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