MCPcopy Index your code
hub / github.com/python/mypy / write_config

Function write_config

mypy/test/test_config_parser.py:25–33  ·  view source on GitHub ↗
(path: Path, content: str | None = None)

Source from the content-addressed store, hash-verified

23
24
25def write_config(path: Path, content: str | None = None) -> None:
26 if path.suffix == ".toml":
27 if content is None:
28 content = "[tool.mypy]\nstrict = true"
29 path.write_text(content)
30 else:
31 if content is None:
32 content = "[mypy]\nstrict = True"
33 path.write_text(content)
34
35
36class FindConfigFileSuite(unittest.TestCase):

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…