Skip to content

Commit

Permalink
Use insinstance(*, int) for tick check (#138)
Browse files Browse the repository at this point in the history
  • Loading branch information
craffel authored Oct 21, 2017
1 parent 3a9153f commit 4fa04b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pretty_midi/pretty_midi.py
Original file line number Diff line number Diff line change
Expand Up @@ -947,7 +947,7 @@ def tick_to_time(self, tick):
if tick >= len(self.__tick_to_time):
self._update_tick_to_time(tick)
# Ticks should be integers
if type(tick) != int:
if not isinstance(tick, int):
warnings.warn('tick should be an int.')
# Otherwise just return the time
return self.__tick_to_time[int(tick)]
Expand Down

0 comments on commit 4fa04b0

Please sign in to comment.