New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use mypy #110

Merged
merged 9 commits into from Jun 7, 2018

Conversation

Projects
None yet
2 participants
@dmerejkowsky
Copy link
Member

dmerejkowsky commented May 30, 2018

No description provided.

dmerejkowsky added some commits Mar 24, 2018

Bring back compatibility with older Pythons
This means:

* Transform type annotations for local variable into
  a `type:` comment

* Adding typing as dependency for Python3.4
""" Look for a workspace root somewhere in the upper directories
hierarchy
"""
head = os.getcwd()
tail = True
tail = "a truthy string"

This comment has been minimized.

@banetl

banetl May 30, 2018

Member

"True as string" ?

@@ -47,19 +50,19 @@ def die(message):
args.cmd_as_str = cmd_as_str


def workspace_subparser(subparser, name):
def workspace_subparser(subparser: Any, name: str) -> Any:

This comment has been minimized.

@banetl

banetl May 30, 2018

Member

argument parser instead of any

config_path = Path(xdg.XDG_CONFIG_HOME)
config_path = config_path.joinpath("tsrc.yml")
return config_path


def dump_tsrc_config(config):
def dump_tsrc_config(config: Any) -> None:

This comment has been minimized.

@banetl

banetl May 30, 2018

Member

use dict instead of any

@dmerejkowsky dmerejkowsky force-pushed the dm/mypy branch from 286ce38 to 5d1620d Jun 7, 2018

@dmerejkowsky dmerejkowsky merged commit 3259a1d into master Jun 7, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@dmerejkowsky dmerejkowsky deleted the dm/mypy branch Jun 7, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment