Skip to content

Commit

Permalink
__iterate_function cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnsonDylan committed Aug 9, 2021
1 parent e6a67c9 commit bef4d74
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions scidatalib/scidata.py
Original file line number Diff line number Diff line change
Expand Up @@ -717,14 +717,13 @@ def __iterate_function(self, it, uidindex, uid=False):
category = 'undefined'

if prev_uid:
uid = prev_uid + category + '/' + str(1) + '/'
uid = prev_uid + category + '/1/'
else:
uid = category + '/' + str(1) + '/'
uid = category + '/1/'

def enumuid(uid):
if uid in uidindex:
uidsplit = uid.rsplit('/', 2)
uid = uidsplit[0] + '/' + str(int(uidsplit[1]) + 1) + '/'
uidsplit = uid.rsplit('/', 2)
uid = uidsplit[0] + '/' + str(int(uidsplit[1]) + 1) + '/'
return uid

while uid in uidindex:
Expand Down

0 comments on commit bef4d74

Please sign in to comment.