typing: Convert function type annotations to Python 3 style.
Generated by com2ann (slightly patched to avoid also converting assignment type annotations, which require Python 3.6), followed by some manual whitespace adjustment, and two fixes for use-before-define issues: - def set_zulip_client(self, zulipToJabberClient: ZulipToJabberBot) -> None: + def set_zulip_client(self, zulipToJabberClient: 'ZulipToJabberBot') -> None: -def init_from_options(options: Any, client: Optional[str] = None) -> Client: +def init_from_options(options: Any, client: Optional[str] = None) -> 'Client': Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
parent
7c5f73dce9
commit
5428c5f296
42 changed files with 311 additions and 577 deletions
|
@ -18,8 +18,7 @@ ZULIP_API_KEY = "0123456789abcdef0123456789abcdef"
|
|||
# and "my-super-secret-repository" repos to
|
||||
# * stream "commits"
|
||||
# * topic "branch_name"
|
||||
def commit_notice_destination(path, commit):
|
||||
# type: (Text, Text) -> Optional[Dict[Text, Text]]
|
||||
def commit_notice_destination(path: Text, commit: Text) -> Optional[Dict[Text, Text]]:
|
||||
repo = path.split('/')[-1]
|
||||
if repo not in ["evil-master-plan", "my-super-secret-repository"]:
|
||||
return dict(stream = "commits",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue