msherry / flycheck-pycheckers

Multiple syntax checker for Python in Emacs, using Flycheck
GNU General Public License v3.0
63 stars 23 forks source link

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

Closed captain-kark closed 4 years ago

captain-kark commented 4 years ago

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 commented 4 years ago

LGTM, thank you!

captain-kark commented 4 years ago

@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!