This repository was archived by the owner on Jun 19, 2020. It is now read-only.
Support relative imports - #14
Open
languitar wants to merge 2 commits into
Open
Conversation
* Disable some more flake8 warnings that pop up on my machine * Newer flake8 columns seems to be indexed one off from the previous tests
This reenables handling relative imports correctly and doesn't seem to be necessary anymore on more recent mypy versions. This will fix #6
Author
|
Yikes, seems to fail horribly on 3.5 and 3.7-dev. But this is probably unrelated to my fix? The whole call to mypy fails there. |
Contributor
|
I don't think this is a good change. You need to handle input via stdin. Most of the flake8 plugins for the IDEs send the buffer contents via stdin. |
Author
|
Ah ok, I didn't know this requirement and there seems to be no test that enforces this. |
Contributor
|
It should probably work with temp files just fine if we take a given filename and do the |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Putting the files in an isolated named folder prevented relative imports in the form of
from .. importfrom working. I cannot see any use for mangling the project structure through a temp dir for recent mypy versions. Everything seems to work correctly now without this.This PR also fixes the tests that are currently failing.