interactions.py icon indicating copy to clipboard operation
interactions.py copied to clipboard

feat: add Member.has_any_role

Open robotbabe opened this issue 4 months ago • 1 comments

Pull Request Type

  • [x] Feature addition
  • [x] 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

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

Checklist

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

robotbabe avatar Feb 22 '24 13:02 robotbabe

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 avatar Feb 22 '24 14:02 AstreaTSS

PR is on track for becoming stale

njusts avatar Mar 30 '24 08:03 njusts