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

Fix get_formatter_for_filename on plugin formatters #2563

Merged
merged 1 commit into from Nov 5, 2023

Conversation

jeanas
Copy link
Contributor

@jeanas jeanas commented Nov 3, 2023

find_plugin_formatters returns (name, cls) tuples.

find_plugin_formatters returns (name, cls) tuples.
@Anteru
Copy link
Collaborator

Anteru commented Nov 5, 2023

Is there a way to unit test this? I'm surprised this has been around for so long. Also, does this mean no plugin formatters worked previously?

@Anteru Anteru self-assigned this Nov 5, 2023
@Anteru Anteru added A-formatting area: changes to formatters changelog-update Items which need to get mentioned in the changelog labels Nov 5, 2023
@Anteru Anteru merged commit f5948ac into pygments:master Nov 5, 2023
15 checks passed
@Anteru Anteru added this to the 2.17 milestone Nov 5, 2023
@jeanas jeanas deleted the fix-plugin-formatters branch November 5, 2023 18:48
@jeanas
Copy link
Contributor Author

jeanas commented Nov 5, 2023

Plugin formatters would work via pygmentize -f or pygments.formatters.find_formatter_class, but not via pygmentize -o autodetect-formatter-from-extension.formatterext or pygments.formatters.get_formatter_for_filename.

I'm not sure there is a way to test it, I would have to investigate more. Maybe tox has some option to install a local package in the test environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-formatting area: changes to formatters changelog-update Items which need to get mentioned in the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants