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

Add hidden --parser option to override the input format, rather than inferring it from the file extension #7835

Closed
wants to merge 8 commits into from

Conversation

felix-cw
Copy link
Contributor

@felix-cw felix-cw commented Oct 6, 2023

Summary

This adds a hidden --parser option to the check command, motivated by #6847.
This option allows overriding the input format of the code, rather than inferring from the file extension.

The possible values are py and ipynb. If --parser is not specified, file formats are inferred from file extensions.

Test Plan

  • Added tests in integration_tests.rs to ensure the parser override worked as expected.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 6, 2023

PR Check Results

Ecosystem

✅ ecosystem check detected no changes.

@charliermarsh
Copy link
Member

This is really nice work. Let me try to get some alignment on what we want this argument to be called in the originating issue, since there was some discussion there still...

@charliermarsh charliermarsh self-requested a review October 20, 2023 16:20
@charliermarsh
Copy link
Member

(Assigning myself as reviewer.)

@felix-cw
Copy link
Contributor Author

Thanks for the kind comment! I'm thinking that the preferred idea in the discussion is to provide an option that maps file extensions to language, whereas this just overrides the language for everything. Please don't hesitate to close this PR if this is the wrong approach.

@felix-cw
Copy link
Contributor Author

I'm closing this PR in favour of #8373 which seems to be a more sensible approach.

@felix-cw felix-cw closed this Oct 31, 2023
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