mirror of https://github.com/zulip/zulip.git
update-authors-json: Clean up type ignores.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
parent
906af61d20
commit
17acf95437
|
@ -8,7 +8,7 @@ JSON data for the /team page contributors section.
|
||||||
from lib import sanity_check
|
from lib import sanity_check
|
||||||
sanity_check.check_venv(__file__)
|
sanity_check.check_venv(__file__)
|
||||||
|
|
||||||
from typing import Any, Dict, List, Optional, Union, cast
|
from typing import Any, Dict, List, Optional, Union
|
||||||
from typing_extensions import TypedDict
|
from typing_extensions import TypedDict
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
@ -118,7 +118,8 @@ def run_production() -> None:
|
||||||
duplicate_commits = json.loads(f.read())
|
duplicate_commits = json.loads(f.read())
|
||||||
for committer in duplicate_commits:
|
for committer in duplicate_commits:
|
||||||
if committer in contribs_list and contribs_list[committer].get('server'):
|
if committer in contribs_list and contribs_list[committer].get('server'):
|
||||||
total_commits = cast(int, contribs_list[committer]['server'])
|
total_commits = contribs_list[committer]['server']
|
||||||
|
assert isinstance(total_commits, int)
|
||||||
duplicate_commits_count = duplicate_commits[committer]
|
duplicate_commits_count = duplicate_commits[committer]
|
||||||
original_commits = total_commits - duplicate_commits_count
|
original_commits = total_commits - duplicate_commits_count
|
||||||
contribs_list[committer]['server'] = original_commits
|
contribs_list[committer]['server'] = original_commits
|
||||||
|
|
Loading…
Reference in New Issue