Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit eeb4686

Browse files
committed
Add --follow-imports back
Seems U jumped the gun on this one. We need --follow-imports=silent to only get output for the file we want to lint and not the entire project. The only other legitimate option is `skip`, so we expose this option in the defaults dict.
1 parent b6e82b2 commit eeb4686

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ For general information on how SublimeLinter works with settings, please see [Se
4444
|Setting|Description|
4545
|:------|:----------|
4646
|cache-dir|The directory to store the cache in. Creates a sub-folder in your temporary directory if not specified.|
47+
|follow-imports|Whether imports should be followed and linted. The default is `silent`, but `skip` may also be used. The other options are not interesting.|
4748

4849
A file named `mypy.ini` is automatically recognized as the `--config-file` parameter, if it exists.
4950
All other args to mypy should be specified in the `args` list.

linter.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ class Mypy(PythonLinter):
4848
# This dict only contains settings for which we have special handling.
4949
defaults = {
5050
# Will default to tempfile.TemporaryDirectory if empty.
51-
"--cache-dir": "",
51+
"--cache-dir:": "",
52+
# Need this to silent lints for other files. Alternatively: 'skip'
53+
"--follow-imports:": "silent",
5254
}
5355
default_type = highlight.WARNING
5456
# selectors = {}

0 commit comments

Comments
 (0)