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

feat(mypy): Support mypy cache in nested modules #51

Merged

Conversation

captain-kark
Copy link
Contributor

I am working on a project that started as a docker image definition,
and has evolved to include a python module in a directory beneath the
top-level root.

cd dockerfile_thing
tree .
.
├── .git
│   └── [ ... ]
├── configs
│   ├── foo.json
│   └── bar.txt
├── image-builder-utility
│   ├── script.sh
│   └── README.md
├── python_module_thing
│   ├── .venv
│   │   └── [ ... ]
│   ├── README.md
│   ├── Makefile
│   ├── project_root
│   │   ├── __init__.py
│   │   └── __main__.py
│   └── requirements.txt
├── some-docker-image
│   ├── Dockerfile
│   └── README.md
└── README.md

This will allow for the python_module_thing mypy cache to populate in
the correct directory, using the current branch name found in the base
project's .git directory. Otherwise, HEAD is always used.

I am working on a project that started as a docker image definition,
and has evolved to include a python module in a directory beneath the
top-level root.

cd dockerfile_thing
tree .
.
├── .git
│   └── [ ... ]
├── configs
│   ├── foo.json
│   └── bar.txt
├── image-builder-utility
│   ├── script.sh
│   └── README.md
├── python_module_thing
│   ├── .venv
│   │   └── [ ... ]
│   ├── README.md
│   ├── Makefile
│   ├── project_root
│   │   ├── __init__.py
│   │   └── __main__.py
│   └── requirements.txt
├── some-docker-image
│   ├── Dockerfile
│   └── README.md
└── README.md

This will allow for the `python_module_thing` mypy cache to populate in
the correct directory, using the current branch name found in the base
project's `.git` directory. Otherwise, `HEAD` is always used.
@msherry
Copy link
Owner

msherry commented Apr 6, 2020

LGTM, thank you!

@msherry msherry merged commit 5885275 into msherry:master Apr 6, 2020
@captain-kark captain-kark deleted the search_past_venv_root_for_vcs_root branch April 13, 2020 08:17
@captain-kark
Copy link
Contributor Author

@msherry please consider merging #40, since I mistakenly closed it last year, without considering that I was still using it locally when I wrote this.

It's used as a part of #50, as well as #39 too!

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.

2 participants