Skip to content

Commit

Permalink
mypy: Annotate stream_data in populate_analytics_db.py handle function.
Browse files Browse the repository at this point in the history
  • Loading branch information
neiljp authored and timabbott committed Mar 25, 2018
1 parent a95e900 commit 8b697b4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion analytics/management/commands/populate_analytics_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def insert_fixture_data(stat: CountStat,
'true': self.generate_fixture_data(stat, 20, 2, 3, .2, 3)}
insert_fixture_data(stat, realm_data, RealmCount)
stream_data = {'false': self.generate_fixture_data(stat, 10, 7, 5, .6, 4),
'true': self.generate_fixture_data(stat, 5, 3, 2, .4, 2)}
'true': self.generate_fixture_data(stat, 5, 3, 2, .4, 2)} # type: Mapping[Optional[str], List[int]]
insert_fixture_data(stat, stream_data, StreamCount)
FillState.objects.create(property=stat.property, end_time=last_end_time,
state=FillState.DONE)
3 changes: 0 additions & 3 deletions mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,6 @@ strict_optional = False
[mypy-zilencer.management.commands.add_new_realm] #22: error: List item 0 has incompatible type "Optional[Stream]"; expected "Stream"
strict_optional = False

[mypy-analytics.management.commands.populate_analytics_db] #148: error: Argument 2 to "insert_fixture_data" has incompatible type "Dict[str, List[int]]"; expected "Mapping[Optional[str], List[int]]"
strict_optional = False

[mypy-zthumbor.loaders.helpers] #83: error: Argument 2 to "get_sign_hash" has incompatible type "Optional[str]"; expected "str"
strict_optional = False

Expand Down

0 comments on commit 8b697b4

Please sign in to comment.