MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _cachedir

Method _cachedir

lib/sqlalchemy/testing/fixtures/mypy.py:47–64  ·  view source on GitHub ↗
(cls)

Source from the content-addressed store, hash-verified

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):

Callers 2

per_func_cachedirMethod · 0.95
cachedirMethod · 0.80

Calls 2

openFunction · 0.85
writeMethod · 0.45

Tested by

no test coverage detected