mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-11 18:01:04 +00:00
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:
parent
220f47b00f
commit
a06cdd188d
1 changed files with 2 additions and 3 deletions
|
|
@ -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():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue