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

Improve heuristic to warn about passing lexer/formatter class #2123

Merged
merged 1 commit into from
May 12, 2022

Conversation

jeanas
Copy link
Contributor

@jeanas jeanas commented Apr 29, 2022

Don't rely on the error message since 'missing 1 required positional
argument' can give false positives. Instead, use issubclass().

Addresses part of #2119.

Don't rely on the error message since 'missing 1 required positional
argument' can give false positives.  Instead, use issubclass().
Copy link
Member

@birkenfeld birkenfeld left a comment

Choose a reason for hiding this comment

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

Thanks, that's much cleaner.

@jeanas jeanas merged commit 49c757c into pygments:master May 12, 2022
@jeanas jeanas deleted the class-heuristic branch May 12, 2022 06:36
@jeanas jeanas added the changelog-update Items which need to get mentioned in the changelog label May 12, 2022
@jeanas jeanas removed the changelog-update Items which need to get mentioned in the changelog label May 20, 2022
@jeanas jeanas added this to the 2.13.0 milestone May 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants