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

chore: enable lint PT009 'use regular assert over self.assert.*' #30521

Merged
merged 3 commits into from
Oct 7, 2024

Conversation

mistercrunch
Copy link
Member

I just got bit by some old school self.assertEqual which is not good as the pytest-augmented, simple assert. Just leveraging the rule, running automated --fix for things it can fix and adding NOQA to the few it didn't auto-fix

I just got bit by some old school self.assertEqual which is not good as the pytest-augmented, simple assert. Just leveraging the rule, running automated --fix for things it can fix and adding NOQA to the few it didn't auto-fix
Copy link
Member

@villebro villebro left a comment

Choose a reason for hiding this comment

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

Nice! that whole "we stole it from JUnit and couldn't bother to make it idiomatic python" assertion style always makes me cringe..

image

@mistercrunch mistercrunch merged commit a849c29 into master Oct 7, 2024
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants