File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
src/algokit_client_generator/generators Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -10,8 +10,8 @@ def enable_mypy(approved_path: pathlib.Path) -> None:
1010 # Read the file text with line endings preserved
1111 lines = approved_path .read_text ().splitlines (keepends = True )
1212 assert (
13- lines [2 ] == "# type : ignore\n "
14- ), f"Expected third line to be '# type : ignore', got { lines [2 ]!r} in { approved_path } "
13+ lines [2 ] == "# mypy : ignore-errors \n "
14+ ), f"Expected third line to be '# mypy : ignore-errors ', got { lines [2 ]!r} in { approved_path } "
1515 # Replace the third line with the updated mypy comment
1616 lines [2 ] = '# mypy: disable-error-code="no-any-return, no-untyped-call, misc, type-arg"\n '
1717 approved_path .write_text ("" .join (lines ))
Original file line number Diff line number Diff line change 55def disable_linting () -> DocumentParts :
66 yield "# flake8: noqa" # this works for flake8 and ruff
77 yield "# fmt: off" # disable formatting
8- yield "# type: ignore" # disable common type warnings
8+ # https://mypy.readthedocs.io/en/stable/common_issues.html#ignoring-a-whole-file
9+ yield "# mypy: ignore-errors" # ignore common mypy warnings
910
1011
1112def generate_header_comments (context : GeneratorContext ) -> DocumentParts :
You can’t perform that action at this time.
0 commit comments