Removes some cruft from sqlalchemy/models.py like unused imports and the unused str_id method.
This commit is contained in:
@@ -132,10 +132,6 @@ def runthis(prompt, cmd, check_exit_code=True):
|
|||||||
|
|
||||||
|
|
||||||
def generate_uid(topic, size=8):
|
def generate_uid(topic, size=8):
|
||||||
if topic == "i":
|
|
||||||
# Instances have integer internal ids.
|
|
||||||
return random.randint(0, 2 ** 32 - 1)
|
|
||||||
else:
|
|
||||||
characters = '01234567890abcdefghijklmnopqrstuvwxyz'
|
characters = '01234567890abcdefghijklmnopqrstuvwxyz'
|
||||||
choices = [random.choice(characters) for x in xrange(size)]
|
choices = [random.choice(characters) for x in xrange(size)]
|
||||||
return '%s-%s' % (topic, ''.join(choices))
|
return '%s-%s' % (topic, ''.join(choices))
|
||||||
|
|||||||
Reference in New Issue
Block a user