mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
use isinstance for type check
This commit is contained in:
parent
0c2a54c567
commit
a817a0a4d2
2 changed files with 5 additions and 5 deletions
|
|
@ -89,7 +89,7 @@ def update_tag(tag, data):
|
|||
# set all data metadata to tag metadata
|
||||
for _k, _v in data_mtd.items():
|
||||
value = str(_v)
|
||||
if type(_v) == dict:
|
||||
if isinstance(_v, dict):
|
||||
value = json.dumps(_v)
|
||||
|
||||
# set the value
|
||||
|
|
|
|||
|
|
@ -856,10 +856,10 @@ def _format_tiles(
|
|||
"""
|
||||
# Math used requires integers for correct output - as such
|
||||
# we ensure our inputs are correct.
|
||||
assert type(tiles_x) is int, "tiles_x must be an integer"
|
||||
assert type(tiles_y) is int, "tiles_y must be an integer"
|
||||
assert type(width) is int, "width must be an integer"
|
||||
assert type(height) is int, "height must be an integer"
|
||||
assert isinstance(tiles_x, int), "tiles_x must be an integer"
|
||||
assert isinstance(tiles_y, int), "tiles_y must be an integer"
|
||||
assert isinstance(width, int), "width must be an integer"
|
||||
assert isinstance(height, int), "height must be an integer"
|
||||
|
||||
out = {"JobInfo": {}, "PluginInfo": {}}
|
||||
cfg = OrderedDict()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue