Update json.py

fix pyCharm warning
'ujson' in try block with 'except ImportError' should also be defined in except block
This inspection detects names that should resolve but don't. Due to dynamic dispatch and duck typing, this is possible in a limited but useful number of cases. Top-level and class-level items are supported better than instance items.
This commit is contained in:
Oleg A 2018-07-21 11:31:18 +03:00 committed by GitHub
parent 220f47b00f
commit a06cdd188d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,11 +3,10 @@ import json
try:
import ujson
_UJSON_IS_AVAILABLE = True
except ImportError:
_UJSON_IS_AVAILABLE = False
ujson = None
_use_ujson = _UJSON_IS_AVAILABLE
_use_ujson = True if ujson else False
def disable_ujson():