FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

add config option to skip package checking by yedpodtrzitko · Pull Request #3789 · python/mypy · GitHub

Repository navigation

add config option to skip package checking - #3789

Closed
yedpodtrzitko wants to merge 2 commits into
python:masterfrom
kiwicom:allow-package-skip
Closed

yedpodtrzitko wants to merge 2 commits into
python:masterfrom
kiwicom:allow-package-skip

Conversation

yedpodtrzitko commented Aug 1, 2017 •
edited
Loading

Copy link
Copy Markdown
Contributor

Hi,
this could be partially related to #626.

This PR adds a new option into the per-module section in config file, which would allow to skip typechecks in a given package.

Example for skipping any packages in kiwi.schemas:

[mypy-kiwi.schemas.*]
skip = true

Thanks for any feedback.

sobolevn commented Dec 18, 2017 •
edited
Loading

Copy link
Copy Markdown
Member

👍 Real life use-case: I need to exclude everything in my_django_app/migrations/ package.

emmatyping commented Feb 25, 2018 •
edited
Loading

Copy link
Copy Markdown
Member

Closing. This is already taken care of by e.g.

[mypy-kiwi.schemas.*]
ignore_missing_imports = True
follow_imports = skip

though thank you for the contribution @yedpodtrzitko.

emmatyping closed this Feb 25, 2018

yedpodtrzitko commented Feb 25, 2018 •
edited
Loading

Copy link
Copy Markdown
Contributor Author

@ethanhs thanks for your response, however the indended behaviour/purpose of skip is different than combination of follow_imports & ignore_missing_imports in your example.

Having the following directory structure (see below), and running mypy check for the whole kw package will go through the schemas submodule anyway. It wont report any errors from there whatsoever, but it will parse the content in there. My main reason for (not) doing that is #3796. And the behaviour of skip works exactly that way.

kw
|-bar
|-foo
|-schemas # <- want to skip parsing anything in here, since it takes eternity
  |-schema_1.py
  |-schema_n.py

However I can understand having such option is not a desired design, so until #3796 will be solved, I'm just gonna keep using my fork.

Cheers,
yed

Copy link
Copy Markdown
Member
  1. If # type: ignore on a line by itself worked, would that satisfy you?
  2. Maybe we could make follow_imports = skip work this way?

Copy link
Copy Markdown
Contributor Author

Maybe we could make follow_imports = skip work this way?

I'd be happy with this solution ^^

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

4 participants


Back | FazBrowse Home | New Git URL