Skip to content

Commit

Permalink
fix strict ci check
Browse files Browse the repository at this point in the history
  • Loading branch information
KotlinIsland committed Oct 31, 2023
1 parent 9c3a4c6 commit feefbbd
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
18 changes: 9 additions & 9 deletions .mypy/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@
"code": "no-any-expr",
"column": 15,
"message": "Expression has type \"Any\"",
"offset": 135,
"offset": 137,
"src": "data = json.load(file.open())",
"target": "mypy.build.load_baseline"
},
Expand Down Expand Up @@ -2651,7 +2651,7 @@
"code": "explicit-override",
"column": 4,
"message": "Method \"visit_type_application\" is not using @override but is overriding a method in class \"mypy.visitor.ExpressionVisitor\"",
"offset": 29,
"offset": 47,
"src": "def visit_type_application(self, tapp: TypeApplication) -> Type:",
"target": "mypy.checkexpr.ExpressionChecker.visit_type_application"
},
Expand Down Expand Up @@ -10403,7 +10403,7 @@
"code": "explicit-override",
"column": 4,
"message": "Method \"_fill_text\" is not using @override but is overriding a method in class \"argparse.HelpFormatter\"",
"offset": 249,
"offset": 251,
"src": "def _fill_text(self, text: str, width: int, indent: str) -> str:",
"target": "mypy.main.AugmentedHelpFormatter._fill_text"
},
Expand Down Expand Up @@ -10755,7 +10755,7 @@
"code": "no-any-expr",
"column": 49,
"message": "Expression has type \"Any\"",
"offset": 17,
"offset": 18,
"src": "parse_config_file(options, set_strict_flags, config_file, stdout, stderr)",
"target": "mypy.main.process_options"
},
Expand Down Expand Up @@ -11841,7 +11841,7 @@
"code": "unreachable",
"column": 16,
"message": "Statement is unreachable",
"offset": 1103,
"offset": 1115,
"src": "return",
"target": "mypy.messages.MessageBuilder.report_protocol_problems"
},
Expand Down Expand Up @@ -25537,7 +25537,7 @@
"code": "no-any-expr",
"column": 13,
"message": "Expression type contains \"Any\" (has type \"int | Any\")",
"offset": 52,
"offset": 55,
"src": "result = process.returncode",
"target": "mypy.test.testcmdline.test_python_cmdline"
},
Expand Down Expand Up @@ -26153,7 +26153,7 @@
"code": "possibly-undefined",
"column": 22,
"message": "Name \"program\" may be undefined",
"offset": 143,
"offset": 144,
"src": "os.remove(program)",
"target": "mypy.test.testpep561"
},
Expand Down Expand Up @@ -33335,7 +33335,7 @@
"code": "explicit-override",
"column": 4,
"message": "Method \"visit_ellipsis_type\" is not using @override but is overriding a method in class \"mypy.type_visitor.SyntheticTypeVisitor\"",
"offset": 6,
"offset": 8,
"src": "def visit_ellipsis_type(self, t: EllipsisType) -> str:",
"target": "mypy.types.TypeStrVisitor.visit_ellipsis_type"
},
Expand Down Expand Up @@ -33763,7 +33763,7 @@
"code": "no-any-expr",
"column": 28,
"message": "Expression type contains \"Any\" (has type \"list[str | Any]\")",
"offset": 464,
"offset": 470,
"src": "docstr_repr = \"\\n\".join(re.split(r\"(?<=[^\\\\])\\\\n\", repr(docstr)))",
"target": "mypy.util.quote_docstring"
}
Expand Down
2 changes: 2 additions & 0 deletions runtests.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@
# time to run.
cmds = {
# Self type check
# We do a no-strict compatible check, this is needed because generating a baseline from the head of upstream
# sound very laborious, strict check is in tox.ini
"self": [
executable,
"-m",
Expand Down
4 changes: 1 addition & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,5 @@ commands = pre-commit run --all-files --show-diff-on-failure
description = type check ourselves
commands =
python runtests.py self
# Do a no-strict compatible check, this is needed because generating a baseline from the head of upstream
# sound very laborious
python -m mypy --config-file mypy_self_check.ini --baseline-file= -p mypy -p mypyc --exclude misc/fix_annotate.py --exclude misc/async_matrix.py --exclude misc/sync-typeshed.py
python -m mypy --config-file mypy_self_check_strict.ini -p mypy -p mypyc
python -m mypy --config-file mypy_self_check.ini misc --exclude misc/sync-typeshed.py

0 comments on commit feefbbd

Please sign in to comment.