Skip to content

feat: add Member.has_any_role #1620

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

Merged
merged 4 commits into from
Mar 30, 2024

Conversation

debowkii
Copy link
Contributor

Pull Request Type

  • Feature addition
  • Bugfix
  • Documentation update
  • Code refactor
  • Tests improvement
  • CI/CD pipeline enhancement
  • Other: [Replace with a description]

Description

This PR fixes has_any_role() not working on member object by adding it to user.py and makes it work as originally documented.

Changes

  • Add has_any_role() to user.py

Test Scenarios

Use has_any_role() on member object.

Python Compatibility

  • I've ensured my code works on Python 3.10.x
  • I've ensured my code works on Python 3.11.x

Checklist

  • I've run the pre-commit code linter over all edited files
  • I've tested my changes on supported Python versions
  • I've added tests for my code, if applicable
  • I've updated / added documentation, where applicable

@AstreaTSS
Copy link
Member

AstreaTSS commented Feb 22, 2024

While I do appreciate the PR (because I think it's still useful), this isn't what the documentation says. It specifically says that it's for checks, not for the actual user.py, and never says that Member was supposed to have it.

Thus, this is fully a feature addition, not a bug fix.

@AstreaTSS AstreaTSS changed the title fix: member.has_any_role working on member feat: add Member.has_any_role Feb 22, 2024
Copy link
Member

@AstreaTSS AstreaTSS left a comment

Choose a reason for hiding this comment

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

You'll need to add the typing of the function to user.pyi too, found in the same folder.

@eightween
Copy link
Member

PR is on track for becoming stale

@eightween eightween added enhancement New feature or request pending Pending approve labels Mar 30, 2024
@silasary silasary requested a review from AstreaTSS March 30, 2024 12:21
@AstreaTSS AstreaTSS merged commit ced71df into interactions-py:unstable Mar 30, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request pending Pending approve
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants