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

Specify Python version requirements #78

Open
magicsquares137 opened this issue Sep 16, 2024 · 0 comments
Open

Specify Python version requirements #78

magicsquares137 opened this issue Sep 16, 2024 · 0 comments

Comments

@magicsquares137
Copy link

There is some backwards compatibility issues with versions of python prior to 3.10; namely with the typing. Use of the | operator in lines like:
def read_json_file(file_path: str | TextIO, encoding: str = "utf-8") -> dict:

doesn't work, in this case you need something like:
def read_json_file(file_path: Union[str, TextIO], encoding: str = "utf-8") -> dict:

Could either specify older versions aren't supported, or make edits to support them with the Union operator

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

No branches or pull requests

1 participant