Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 575b670

Browse files
committed
Fix references to deprecated objects in the types module
2to3 fixer: types
1 parent 30f772a commit 575b670

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

IPython/utils/jsonutil.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ def json_clean(obj):
184184
"""
185185
# types that are 'atomic' and ok in json as-is. bool doesn't need to be
186186
# listed explicitly because bools pass as int instances
187-
atomic_ok = (unicode_type, int, types.NoneType)
187+
atomic_ok = (unicode_type, int, type(None))
188188

189189
# containers that we need to convert into lists
190190
container_to_list = (tuple, set, types.GeneratorType)

IPython/utils/wildcard.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def is_type(obj, typestr_or_type):
4444
TODO: Should be extended for choosing more than one type."""
4545
if typestr_or_type == "all":
4646
return True
47-
if type(typestr_or_type) == types.TypeType:
47+
if type(typestr_or_type) == type:
4848
test_type = typestr_or_type
4949
else:
5050
test_type = typestr2type.get(typestr_or_type, False)

0 commit comments

Comments
 (0)