Apply inline mypy configuration comments and check for invalid options.
(self, flags: list[tuple[int, str]] | None)
| 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: |
no test coverage detected