-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#183: add mypy to travis.yml and some type hints
- Loading branch information
Showing
4 changed files
with
27 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
# Python Version: 3.x | ||
import requests | ||
from typing import Callable, Optional, Tuple | ||
|
||
class Service(object): | ||
def login(self, get_credentials, session=None): | ||
def login(self, get_credentials: Callable[[], Tuple[str, str]], session: Optional[requests.Session] = None): | ||
raise NotImplementedError | ||
def get_url(self): | ||
def get_url(self) -> str: | ||
raise NotImplementedError | ||
def get_name(self): | ||
def get_name(self) -> str: | ||
raise NotImplementedError | ||
@classmethod | ||
def from_url(self, s): | ||
def from_url(self, s: str) -> str: | ||
pass |