Skip to content
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

files option not supported #1

Closed
apryor6 opened this issue May 15, 2019 · 5 comments
Closed

files option not supported #1

apryor6 opened this issue May 15, 2019 · 5 comments

Comments

@apryor6
Copy link

apryor6 commented May 15, 2019

First off, this is great, and I see that this is a brand new project. Personally I'm very excited about it and spent the morning setting it up in my VS Code environment.

One of the first things I ran into was that if you don't open VS Code within the project that you want to analyze, then there is no autodetection of files that may be further down the tree (such as if your root directory is a monorepo). According to the mypy docs, it seems there is a files option that could be passed to provide additional locations to search, but when I provide this flag with a glob like "**/*.py" it fails with either a mypy: can't read file... (at the command line) or an error about a misunderstood option if placed in the mypy.ini in the [mypy] section.

Do you know if this is expected or if there is a workaround?

And, thanks -- half the reason I opened this issue was to have an excuse to encourage this project.

@matangover
Copy link
Owner

matangover commented May 16, 2019

Thanks for your kind words! :)

I've also found that documentation about files and was confused as to why it wasn't working for me. Turns out that option isn't released yet -- it was merged to mypy master on April 22 but the latest release 0.701 is from April 16.

You should set the mypy.targets setting in your workspace settings in VS Code -- here's what I wrote in the README:

Use the mypy.targets setting to specify a list of target files or folders for mypy to analyze. By default the entire workspace folder is checked. Note that mypy does not recurse into folders without an __init__.py.

Mypy already has a feature request to recurse into all submodules even without __init__.py.

@matangover
Copy link
Owner

And I fixed the link in the README to point to the stable rather than latest mypy docs.

@matangover
Copy link
Owner

@apryor6 did this solve your issue?

@apryor6
Copy link
Author

apryor6 commented May 22, 2019

Yes thank you

@daturkel
Copy link

I've also found that documentation about files and was confused as to why it wasn't working for me. Turns out that option isn't released yet -- it was merged to mypy master on April 22 but the latest release 0.701 is from April 16.

this just cleared up so much confusion for me, thank you!

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

No branches or pull requests

3 participants