How to do type hinting in Python2.x. You'll probably need to pip install typing
for the typing package.
Last active
March 10, 2016 08:47
-
-
Save drewsonne/cf5ffbc924f513157d52 to your computer and use it in GitHub Desktop.
Python Stub files
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
class Expenses(object): | |
def load(self): | |
return self | |
def run(self): | |
return self | |
def _parse_args(self): | |
return self |
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
import expenses | |
import typing | |
class Expenses(object): | |
def load(self) -> expenses.Ncexpenses: ... | |
def run(self) -> expenses.Ncexpenses: ... | |
def _parse_args(self, args: typing.List[str]) -> expenses.Ncexpenses: ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment