Skip to content

mypy --strict #181

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

Closed
wants to merge 12 commits into from
Closed

mypy --strict #181

wants to merge 12 commits into from

Conversation

gronke
Copy link
Member

@gronke gronke commented Oct 20, 2017

successor of #131 ?

igalic and others added 12 commits October 8, 2017 20:07
This patchset addresses #39.

we've now added the entire (default) config of flake8-mypy.
The following options deviate from their default (which gets us a step
closer to mypy --strct)

- ignore_missing_imports=False
- follow_imports=True
- cache_dir=.mypy_cache
- disallow_untyped_calls=True
- warn_return_any=True

We've also toggled these two:

- warn_redundant_casts=True
- warn_unused_ignores=True

Finally, we check for

- check_untyped_defs=True

For the full --strict set, we'd also need:

- disallow_untyped_defs=True

But that, we'll need better typedefs.
* add Optional where needed (even if it was implicit thru = None)
* fix JailConfig type hints: we were pointing to the wrong thing
* Logger now has types
* error: take *Any* value, it's an error after all
This is an addendum to #157 (Resource is an abstract class, be clear about it)
This patch is an addendum to #157 (Resource is an abstract class, be clear about it)
rather than implicitly setting a parameter `Optional[foo]`, by simply
assigning it `None`, we make it explicit.
This will be encouraged in newer mypy releases, and is currently
enforced through `--strict`, so let's get going!
rather than implicitly setting a parameter `Optional[foo]`, by simply
assigning it `None`, we make it explicit.
This will be encouraged in newer mypy releases, and is currently
enforced through `--strict`, so let's get going!
@gronke gronke closed this Oct 21, 2017
@igalic igalic deleted the chore/mypy-stricter branch January 20, 2019 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants