Skip to content

Commit

Permalink
make flake8 happy
Browse files Browse the repository at this point in the history
  • Loading branch information
epwalsh committed Sep 8, 2023
1 parent 6b977d0 commit a33dbb0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/unshard.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def shard_size(shard_md):


def objects_are_equal(a: Any, b: Any) -> bool:
if type(a) != type(b):
if type(a) is not type(b):
return False
if isinstance(a, ndarray):
return np.array_equal(a, b)
Expand Down Expand Up @@ -139,7 +139,7 @@ def _rebuild_from_type_v2_monkey(func, new_type, args, state):

def unshard_object(os: List[Any]) -> Any:
rank0_item = os[0]
assert all(type(o) == type(rank0_item) for o in os)
assert all(type(o) is type(rank0_item) for o in os)
if isinstance(rank0_item, str):
assert all(o == rank0_item for o in os)
return rank0_item
Expand Down

0 comments on commit a33dbb0

Please sign in to comment.