question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Enable Mypy `--strict` internally

See original GitHub issue

I think being compatible with mypy --strict benefits end users who are also using it, if https://github.com/encode/httpcore/pull/513 is merged then there isn’t much work left to be compatible with strict mode.

See also https://github.com/encode/httpcore/issues/512

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:13 (11 by maintainers)

github_iconTop GitHub Comments

3reactions
graingertcommented, Jun 19, 2022

adding typing in anyio found a large number of type level bugs, I’m in favor of this change - so unmarking stale

1reaction
RA80533commented, Apr 24, 2022

Based on #524 I’d probably be somewhat against it - looks like extra noise & fluff from my perspective.

Are there particular changes in the PR that you would rather see addressed separately, @tomchristie?

  1. Narrowing # type: ignore to a particular class of error
  2. Correcting incomplete dict and list types
  3. Using type aliases on values with domain significance (HeadersAsMapping versus dict)
  4. Casting types brought in from the h2 package

2. is the most important for the purpose of the PR. Each correction means one less error showing up to the user in VS Code and the like.

Read more comments on GitHub >

github_iconTop Results From Across the Web

The mypy command line - mypy 0.991 documentation
You can see the list of flags enabled by strict mode in the full mypy --help output. Note: the exact list of flags...
Read more >
Mypy Documentation - Read the Docs
1.1.3 Strict mode and configuration. Mypy has a strict mode that enables a number of additional checks, like --disallow-untyped-defs.
Read more >
Ubuntu Manpage: mypy - Optional static typing for Python
You can see the list of flags enabled by strict mode in the full mypy --help output. Note: the exact list of flags...
Read more >
mypy command man page - ManKier
You can also use a config file to configure mypy instead of using command line flags. ... Disable strict Optional checks (inverse: --strictoptional) ......
Read more >
The Comprehensive Guide to mypy - DEV Community ‍ ‍
Note: Starting from Python 3.7, you can add a future import, from __future__ import annotations at the top of your files, which will...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found