Skip to content

Annotation & Type Checking Fixes#445

Merged
CarrotManMatt merged 12 commits intomainfrom
annotation-and-type-fixes
Apr 14, 2025
Merged

Annotation & Type Checking Fixes#445
CarrotManMatt merged 12 commits intomainfrom
annotation-and-type-fixes

Conversation

@CarrotManMatt
Copy link
Copy Markdown
Member

Suspended until #442 is merged

@CarrotManMatt CarrotManMatt added bug Something isn't working refactor Improvements to the codebase that do not directly affect users suspended Delayed until a later date deployment Changes to the deployment or CI/CD configuration labels Mar 16, 2025
@CarrotManMatt CarrotManMatt self-assigned this Mar 16, 2025
@CarrotManMatt CarrotManMatt marked this pull request as draft March 16, 2025 17:56
@CarrotManMatt CarrotManMatt force-pushed the annotation-and-type-fixes branch from 58f79f0 to c04018f Compare March 16, 2025 17:58
@MattyTheHacker MattyTheHacker removed the suspended Delayed until a later date label Mar 17, 2025
@MattyTheHacker MattyTheHacker requested a review from Copilot March 31, 2025 08:27
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR makes annotation and type checking fixes while also cleaning up various noinspection comments and minor docstring formatting issues.

  • Updated the exported symbols in exceptions/committee_actions.py
  • Removed redundant noinspection comments and improved minor docstring text across multiple files
  • Adjusted logging and error handling messages for consistency

Reviewed Changes

Copilot reviewed 33 out of 33 changed files in this pull request and generated no comments.

Show a summary per file
File Description
exceptions/committee_actions.py Updated all to explicitly export relevant exception classes
exceptions/base.py Removed redundant noinspection comments from abstract property definitions
db/core/models/utils.py Updated docstring wording for consistency
db/core/models/managers.py Removed noinspection comments and ensured consistent formatting
db/core/models/init.py Added AssignedCommitteeAction to the module all and updated inline documentation
config.py Revised docstrings and replaced logging.warning with logger.warning
Various cogs/*.py files Removed noinspection comments and updated inline documentation for clarity

@CarrotManMatt
Copy link
Copy Markdown
Member Author

CarrotManMatt commented Apr 7, 2025

Todo:

  • Enforce banned type aliases
  • Remove redundant ruff rule ignores
  • Ignore ruff rule ICN001 (don't use short but common import aliases)

@CarrotManMatt CarrotManMatt marked this pull request as ready for review April 13, 2025 23:03
@MattyTheHacker
Copy link
Copy Markdown
Member

mostly looks good - but what does the mention string thing do? Can you not just do <@ROLE_NAME> and it does it automatically?

@MattyTheHacker MattyTheHacker requested a review from Copilot April 14, 2025 10:17
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 31 out of 31 changed files in this pull request and generated 1 comment.

Comment thread cogs/strike.py
@CarrotManMatt
Copy link
Copy Markdown
Member Author

CarrotManMatt commented Apr 14, 2025

what does the mention string thing do? Can you not just do <@ROLE_NAME> and it does it automatically?

It fetches the role object then uses the pycord property mention to create the correct string. It also returns a default value if the role does not exist. This makes it more flexible and dynamic if the role name gets changed as they are not hard coded into the message strings.

The previous code also used this dynamic mention retrieval, but the fallback code was on the call side rather than wrapped in this utility function for reuse.

@CarrotManMatt CarrotManMatt merged commit 37ff3dc into main Apr 14, 2025
9 checks passed
@CarrotManMatt CarrotManMatt deleted the annotation-and-type-fixes branch April 14, 2025 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working deployment Changes to the deployment or CI/CD configuration refactor Improvements to the codebase that do not directly affect users

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants