mypy: Annotate stream_data in populate_analytics_db.py handle function.

This commit is contained in:
neiljp (Neil Pilgrim) 2018-03-24 22:23:11 +00:00 committed by Tim Abbott
parent a95e9000fb
commit 8b697b4093
2 changed files with 1 additions and 4 deletions

View File

@ -144,7 +144,7 @@ class Command(BaseCommand):
'true': self.generate_fixture_data(stat, 20, 2, 3, .2, 3)} 'true': self.generate_fixture_data(stat, 20, 2, 3, .2, 3)}
insert_fixture_data(stat, realm_data, RealmCount) insert_fixture_data(stat, realm_data, RealmCount)
stream_data = {'false': self.generate_fixture_data(stat, 10, 7, 5, .6, 4), 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) insert_fixture_data(stat, stream_data, StreamCount)
FillState.objects.create(property=stat.property, end_time=last_end_time, FillState.objects.create(property=stat.property, end_time=last_end_time,
state=FillState.DONE) state=FillState.DONE)

View File

@ -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" [mypy-zilencer.management.commands.add_new_realm] #22: error: List item 0 has incompatible type "Optional[Stream]"; expected "Stream"
strict_optional = False 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" [mypy-zthumbor.loaders.helpers] #83: error: Argument 2 to "get_sign_hash" has incompatible type "Optional[str]"; expected "str"
strict_optional = False strict_optional = False