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

Method apply_inline_configuration

mypy/build.py:3288–3296  ·  view source on GitHub ↗

Apply inline mypy configuration comments and check for invalid options.

(self, flags: list[tuple[int, str]] | None)

Source from the content-addressed store, hash-verified

3286 self.apply_inline_configuration(flags)
3287
3288 def apply_inline_configuration(self, flags: list[tuple[int, str]] | None) -> None:
3289 """Apply inline mypy configuration comments and check for invalid options."""
3290 if flags:
3291 changes, config_errors = parse_mypy_comments(flags, self.options)
3292 self.options = self.options.apply_changes(changes)
3293 self.manager.errors.set_file(self.xpath, self.id, self.options)
3294 for lineno, error in config_errors:
3295 self.manager.error(lineno, error)
3296 self.check_for_invalid_options()
3297
3298 def check_for_invalid_options(self) -> None:
3299 if self.options.mypyc and not self.options.strict_bytes:

Callers 3

parse_fileMethod · 0.95
parse_parallelMethod · 0.80

Calls 5

parse_mypy_commentsFunction · 0.90
apply_changesMethod · 0.80
set_fileMethod · 0.80
errorMethod · 0.45

Tested by

no test coverage detected