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 8, 2016
1 parent 9bce672 commit b894637
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions zilencer/management/commands/populate_db.py
Expand Up @@ -179,28 +179,28 @@ 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 = get_client("API")
client_id = random.randint(1, 2) # type: int
if client_id == 1:
client = get_client("API") # type: Client
else:
client = get_client("website")
UserPresence.objects.get_or_create(user_profile=user, client=client, timestamp=date, status=status)

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 b894637

Please sign in to comment.