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

Useful error message if somebody passes a filename instead of module name to stub/apply #65

Closed
carljm opened this issue Jan 29, 2018 · 2 comments

Comments

@carljm
Copy link
Contributor

carljm commented Jan 29, 2018

We should be able to detect this with a heuristic like "no traces found and os.path.exists(...)"

Shouldn't just use a naive endswith('.py'), it's perfectly valid to have a package or module named py.

@carljm
Copy link
Contributor Author

carljm commented Jan 30, 2018

#37 partially implemented this, but since it looks for os.sep, it doesn't cover the case where someone has a top-level module and just does monkeytype stub mymodule.py. So it could still be improved somewhat by doing the os.path.exists check in case of no traces found.

@piperchester
Copy link

piperchester commented Jun 8, 2018

It looks like this is in progress by @iamrajhans ? I'm looking for a good first issue to get involved as well 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants