Skip to content

fixed issue of mypy for test_ujson #29022

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

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pandas/tests/io/json/test_ujson.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
try:
Copy link
Member

Choose a reason for hiding this comment

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

Can you get rid of the try...except altogether? This looks like legacy code - import json should work dating back to at least Python 2.6

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure, will do it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@WillAyd I have done the changes, please review

import json
except ImportError:
import simplejson as json
import simplejson as json # type: ignore
import calendar
import datetime
import decimal
Expand Down
3 changes: 0 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,6 @@ ignore_errors=True
[mypy-pandas.tests.indexing.test_loc]
ignore_errors=True

[mypy-pandas.tests.io.json.test_ujson]
ignore_errors=True

[mypy-pandas.tests.io.test_sql]
ignore_errors=True

Expand Down