Skip to content

Conversation

Paillat-dev
Copy link
Member

Summary

Remove dead code. valid_commands is used nowhere else other than the if check, the if check always evaluates to false because an instance of Generator is never an instance of ApplicationCommand, and _filter was only used once and was always equal to _BaseCommand, so I replaced it with that.

Information

  • This PR fixes an issue.
  • This PR adds something new (e.g. new method or parameters).
  • This PR is a breaking change (e.g. methods or parameters removed/renamed).
  • This PR is not a code change (e.g. documentation, README, typehinting,
    examples, ...).

Checklist

  • I have searched the open pull requests for duplicates.
  • If code changes were made then they have been tested.
    • I have updated the documentation to reflect the changes.
  • If type: ignore comments were used, a comment is also left explaining why.
  • I have updated the changelog to include these changes.

@Lulalaby Lulalaby merged commit 1f30a35 into Pycord-Development:master Mar 30, 2025
28 checks passed
@Paillat-dev Paillat-dev deleted the refactor/dead-code branch March 30, 2025 11:57
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.

3 participants