mirror of https://github.com/zulip/zulip.git
mypy: Correct the story about skipping `zulip`.
Also remove the ignore_missing_imports on it, which has no effect. That setting only does anything when mypy doesn't know where to find the module; follow_imports only does anything when it does know. See upstream docs: http://mypy.readthedocs.io/en/latest/config_file.html#per-module-flags (I confirmed with `strace -f -efile` that the place mypy is finding the `zulip` module is in fact in the virtualenv.)
This commit is contained in:
parent
9f2b8a4a11
commit
5b99223814
29
mypy.ini
29
mypy.ini
|
@ -46,6 +46,26 @@ ignore_errors = True
|
|||
[mypy-zerver.tornado.autoreload]
|
||||
ignore_errors = True
|
||||
|
||||
|
||||
#
|
||||
#
|
||||
# SKIP IMPORTS
|
||||
#
|
||||
#
|
||||
|
||||
[mypy-zulip]
|
||||
# mypy is finding this module in the virtualenv. We should tell it
|
||||
# about it on the command line; until we do, everything imported from
|
||||
# it gets treated as Any, and we have to acknowledge it here.
|
||||
#
|
||||
# (The mypy daemon insists that everything it checks, it's told about
|
||||
# in advance, which means setting follow_imports to either `skip` or
|
||||
# `error`. Our global setting of `error` gets us an error if there's
|
||||
# something it *could* check, because it can find the file, but we
|
||||
# haven't told it to.)
|
||||
follow_imports = skip
|
||||
|
||||
|
||||
#
|
||||
#
|
||||
# IGNORE MISSING IMPORTS
|
||||
|
@ -66,15 +86,6 @@ ignore_missing_imports = True
|
|||
# Our own libraries, maintained outside this repo and installed
|
||||
# through pip. We need to tell mypy where to find them.
|
||||
|
||||
[mypy-zulip]
|
||||
ignore_missing_imports = True
|
||||
# This isn't the right solution (we should tell mypy where to find
|
||||
# them), but it's necessary to avoid warnings like this:
|
||||
# note: Import of 'zulip' ignored
|
||||
# I'm not sure how to tell mypy where to find these without having it
|
||||
# also process everything else in the Zulip virtualenv...
|
||||
follow_imports = skip
|
||||
|
||||
[mypy-zulip_bots.lib]
|
||||
ignore_missing_imports = True
|
||||
|
||||
|
|
Loading…
Reference in New Issue