Skip to content

ENH: Implemented a check to test if filepath_or_buffer is a valid JSON string or a valid filepath and raises an error in the case that it is neither. #44926

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

Closed
wants to merge 3 commits into from

Conversation

cheungje
Copy link

ENH: Implemented a check to test if filepath_or_buffer is a valid JSON string or a valid filepath and raises an error in the case that it is neither. Per the thread in #29102 and related thread in #29104, there should be a way to differentiate between a json string passed as input and a file_path. We cannot just say that since a string is not a valid path, raise a FileNotFoundException. So this PR attempts to check intent.

jcheungpq and others added 3 commits December 15, 2021 15:22
…N string or a valid filepath and raises an error in the case that it is neither.
…o check-intent

ENH: Check intent of filepath_or_buffer.
@pep8speaks
Copy link

Hello @cheungje! Thanks for opening this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 693:1: W293 blank line contains whitespace
Line 730:89: E501 line too long (89 > 88 characters)
Line 739:89: E501 line too long (96 > 88 characters)

@phofl
Copy link
Member

phofl commented Dec 16, 2021

Please open only one pr. You can easily push this to your other pr

@phofl phofl closed this Dec 16, 2021
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.

4 participants