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

with_any_role_check updated #145

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Commits on Feb 2, 2022

  1. Added updated with_any_role_check.

    Patchwork Collective committed Feb 2, 2022
    Configuration menu
    Copy the full SHA
    1124aad View commit details
    Browse the repository at this point in the history
  2. Nox cleanups.

    Patchwork Collective committed Feb 2, 2022
    Configuration menu
    Copy the full SHA
    15bdc0f View commit details
    Browse the repository at this point in the history
  3. Simple test for with_any_role_check.

    Patchwork Collective committed Feb 2, 2022
    Configuration menu
    Copy the full SHA
    c374129 View commit details
    Browse the repository at this point in the history
  4. Removed Python 3.10 type hinting.

    Removed unused/leftover slots.
    Loosened HasAnyRoleCheck and with_any_role_check paramter requirements to a more general type.
    Changed HasAnyRoleCheck.required_roles to a set type for better performance.
    Patchwork Collective committed Feb 2, 2022
    Configuration menu
    Copy the full SHA
    186b465 View commit details
    Browse the repository at this point in the history
  5. Update docs to reflect new typing.

    Simplified hanlder logic.
    Reverted internal roles typing from set to list.
    Simplified role checking logic.
    Patchwork Collective committed Feb 2, 2022
    Configuration menu
    Copy the full SHA
    8b3998c View commit details
    Browse the repository at this point in the history
  6. Fixed __all__ in tanjun and checks.py.

    Updated docs to clarify check locks commands to guilds.
    Patchwork Collective committed Feb 2, 2022
    Configuration menu
    Copy the full SHA
    305ab30 View commit details
    Browse the repository at this point in the history
  7. Changed for-if loop to any-map.

    Patchwork Collective committed Feb 2, 2022
    Configuration menu
    Copy the full SHA
    c40e3b9 View commit details
    Browse the repository at this point in the history
  8. Condensed HasAnyRoles.check_roles into an any() statement.

    Patchwork Collective committed Feb 2, 2022
    Configuration menu
    Copy the full SHA
    d87f8cf View commit details
    Browse the repository at this point in the history
  9. We tested this some tonight, with caching on and off, and it seems to…

    … work. It's not the most elegant solution or the fastes for sure.
    
    Snab had mentioned making `HasAnyRole.required_roles` a property and coercing all the roles to ids for faster comparision. We might add that in later.
    Patchwork Collective committed Feb 2, 2022
    Configuration menu
    Copy the full SHA
    9bc580d View commit details
    Browse the repository at this point in the history
  10. Added HasAnyRole.ids_only as mentioned <FasterSpeeding#145 (comment)>…

    … in PR
    Patchwork Collective committed Feb 2, 2022
    Configuration menu
    Copy the full SHA
    df3ba8d View commit details
    Browse the repository at this point in the history