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

Linter-specific ignorePatterns (esp. mypy) #11762

Closed
bhrutledge opened this issue May 12, 2020 · 3 comments
Closed

Linter-specific ignorePatterns (esp. mypy) #11762

bhrutledge opened this issue May 12, 2020 · 3 comments
Labels
feature-request Request for new features or functionality

Comments

@bhrutledge
Copy link

bhrutledge commented May 12, 2020

Possible duplicate of #3396, and related to microsoft/vscode-black-formatter#359.

I've been adding type annotations to twine, but only for the source (i.e., not the tests). Our tox configuration only runs mypy on the source directory, but the VS Code mypy support runs commands like mypy tests/test_upload.py, which results in spurious errors.

In pypa/twine#619, I worked around this by making the tests directory a package, and telling mypy to ignore errors. This feels hacky, but according to python/mypy#4675, it seems like the only way to tell mypy to ignore a directory.

So, I'm wondering if options like python.linting.mypyIgnorePatterns could be added, or if python.linting.ignorePatterns could be on object with keys like mypy. In both cases, the values would be a list of patterns.

@bhrutledge bhrutledge added triage-needed Needs assignment to the proper sub-team feature-request Request for new features or functionality labels May 12, 2020
@ghost ghost removed the triage-needed Needs assignment to the proper sub-team label May 12, 2020
@karthiknadig
Copy link
Member

Thank you for the suggestion! We have marked this issue as "needs decision" to make sure we have a conversation about your idea. We plan to leave this feature request open for at least a month to see how many 👍 votes the opening comment gets to help us make our decision.

@karthiknadig
Copy link
Member

Related #1577

@luabud
Copy link
Member

luabud commented Jun 10, 2020

Closing in favour of #1577 as we'll respect mypy settings better once we address that issue.

@luabud luabud closed this as completed Jun 10, 2020
@ghost ghost removed the needs decision label Jun 10, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

3 participants