Skip to content

Commit

Permalink
mypy: annotations Fixes: #2426
Browse files Browse the repository at this point in the history
  • Loading branch information
Juanvulcano committed Dec 7, 2016
1 parent 9bce672 commit 94d4baf
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions zilencer/management/commands/populate_db.py
Expand Up @@ -179,16 +179,16 @@ def handle(self, **options):
Recipient.objects.filter(type=Recipient.STREAM)]

# Extract a list of all users
user_profiles = list(UserProfile.objects.all()) # type: List[Any]
user_profiles = list(UserProfile.objects.all()) # type: UserProfile

# Populate users with some bar data
for user in user_profiles:
month = random.randint(range(1, 12)) # type: Any
day = random.raindint(range(1, 28)) # type: Any
month = random.randint(1, 12) # type: int
day = random.randint(1, 28) # type: int
status = 2 # type: int
date = datetime.datetime(2015, month, day) # type: datetime.datetime
client = random.randint(range(1, 2)) # type: Any
if random_client == 1:
client = random.randint(1, 2) # type: int
if client == 1:
client = get_client("API")
else:
client = get_client("website")
Expand All @@ -197,10 +197,10 @@ def handle(self, **options):
user_profiles_ids = [user_profile.id for user_profile in user_profiles]
# Create several initial huddles
for i in range(options["num_huddles"]):
get_huddle(random.sample(user_profiles_id, random.randint(3, 4)))
get_huddle(random.sample(user_profiles_ids, random.randint(3, 4)))

# Create several initial pairs for personals
personals_pairs = [random.sample(user_profiles_id, 2)
personals_pairs = [random.sample(user_profiles_ids, 2)
for i in range(options["num_personals"])]

threads = options["threads"]
Expand Down

0 comments on commit 94d4baf

Please sign in to comment.