Skip to content

fix(userrole): Fix guaranteed-to-fail comparison#108466

Merged
kcons merged 2 commits intomasterfrom
kcons/phase5
Feb 18, 2026
Merged

fix(userrole): Fix guaranteed-to-fail comparison#108466
kcons merged 2 commits intomasterfrom
kcons/phase5

Conversation

@kcons
Copy link
Member

@kcons kcons commented Feb 18, 2026

settings.SENTRY_USER_PERMISSIONS is a tuple, UserRole.permissions is typed as a list, so they are never expected to be equal.
By converting the tuple to a list, it is a meaningful comparison.

This paves the way for strict_equality = True in mypy.

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Feb 18, 2026
@kcons kcons requested a review from a team February 18, 2026 18:35
Copy link
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

@kcons kcons merged commit acc3761 into master Feb 18, 2026
78 checks passed
@kcons kcons deleted the kcons/phase5 branch February 18, 2026 22:39
JonasBa pushed a commit that referenced this pull request Feb 19, 2026
settings.SENTRY_USER_PERMISSIONS is a tuple, UserRole.permissions is
typed as a list, so they are never expected to be equal.
By converting the tuple to a list, it is a meaningful comparison.

This paves the way for strict_equality = True in mypy.
kcons added a commit that referenced this pull request Feb 23, 2026
#108606)

strict_equality occasionally seems a bit picky, but it flags nonsense
comparisons that can be tricky to identify otherwise.
On average, it seems to make us safer and more honest without too much
cost, and this in turn makes us able to move faster.

See also:
 * #108478
 * #108466
 * #108462
 * #108450
 * #108448
 * #108578
mchen-sentry pushed a commit that referenced this pull request Feb 24, 2026
settings.SENTRY_USER_PERMISSIONS is a tuple, UserRole.permissions is
typed as a list, so they are never expected to be equal.
By converting the tuple to a list, it is a meaningful comparison.

This paves the way for strict_equality = True in mypy.
mchen-sentry pushed a commit that referenced this pull request Feb 24, 2026
#108606)

strict_equality occasionally seems a bit picky, but it flags nonsense
comparisons that can be tricky to identify otherwise.
On average, it seems to make us safer and more honest without too much
cost, and this in turn makes us able to move faster.

See also:
 * #108478
 * #108466
 * #108462
 * #108450
 * #108448
 * #108578
@github-actions github-actions bot locked and limited conversation to collaborators Mar 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants