(cls)
| 45 | |
| 46 | @classmethod |
| 47 | def _cachedir(cls): |
| 48 | # as of mypy 0.971 i think we need to keep mypy_path empty |
| 49 | mypy_path = "" |
| 50 | |
| 51 | with tempfile.TemporaryDirectory() as cachedir: |
| 52 | with open( |
| 53 | Path(cachedir) / "plain_mypy_config.cfg", "w" |
| 54 | ) as config_file: |
| 55 | config_file.write(f""" |
| 56 | [mypy]\n |
| 57 | show_error_codes = True\n |
| 58 | {mypy_path} |
| 59 | disable_error_code = var-annotated,no-untyped-call |
| 60 | [mypy-sqlalchemy.*] |
| 61 | ignore_errors = True |
| 62 | |
| 63 | """) |
| 64 | yield cachedir |
| 65 | |
| 66 | @config.fixture() |
| 67 | def mypy_runner(self, cachedir): |
no test coverage detected