Skip to content

Commit feefbbd

Browse files
committed
fix strict ci check
1 parent 9c3a4c6 commit feefbbd

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

.mypy/baseline.json

+9-9
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,7 @@
655655
"code": "no-any-expr",
656656
"column": 15,
657657
"message": "Expression has type \"Any\"",
658-
"offset": 135,
658+
"offset": 137,
659659
"src": "data = json.load(file.open())",
660660
"target": "mypy.build.load_baseline"
661661
},
@@ -2651,7 +2651,7 @@
26512651
"code": "explicit-override",
26522652
"column": 4,
26532653
"message": "Method \"visit_type_application\" is not using @override but is overriding a method in class \"mypy.visitor.ExpressionVisitor\"",
2654-
"offset": 29,
2654+
"offset": 47,
26552655
"src": "def visit_type_application(self, tapp: TypeApplication) -> Type:",
26562656
"target": "mypy.checkexpr.ExpressionChecker.visit_type_application"
26572657
},
@@ -10403,7 +10403,7 @@
1040310403
"code": "explicit-override",
1040410404
"column": 4,
1040510405
"message": "Method \"_fill_text\" is not using @override but is overriding a method in class \"argparse.HelpFormatter\"",
10406-
"offset": 249,
10406+
"offset": 251,
1040710407
"src": "def _fill_text(self, text: str, width: int, indent: str) -> str:",
1040810408
"target": "mypy.main.AugmentedHelpFormatter._fill_text"
1040910409
},
@@ -10755,7 +10755,7 @@
1075510755
"code": "no-any-expr",
1075610756
"column": 49,
1075710757
"message": "Expression has type \"Any\"",
10758-
"offset": 17,
10758+
"offset": 18,
1075910759
"src": "parse_config_file(options, set_strict_flags, config_file, stdout, stderr)",
1076010760
"target": "mypy.main.process_options"
1076110761
},
@@ -11841,7 +11841,7 @@
1184111841
"code": "unreachable",
1184211842
"column": 16,
1184311843
"message": "Statement is unreachable",
11844-
"offset": 1103,
11844+
"offset": 1115,
1184511845
"src": "return",
1184611846
"target": "mypy.messages.MessageBuilder.report_protocol_problems"
1184711847
},
@@ -25537,7 +25537,7 @@
2553725537
"code": "no-any-expr",
2553825538
"column": 13,
2553925539
"message": "Expression type contains \"Any\" (has type \"int | Any\")",
25540-
"offset": 52,
25540+
"offset": 55,
2554125541
"src": "result = process.returncode",
2554225542
"target": "mypy.test.testcmdline.test_python_cmdline"
2554325543
},
@@ -26153,7 +26153,7 @@
2615326153
"code": "possibly-undefined",
2615426154
"column": 22,
2615526155
"message": "Name \"program\" may be undefined",
26156-
"offset": 143,
26156+
"offset": 144,
2615726157
"src": "os.remove(program)",
2615826158
"target": "mypy.test.testpep561"
2615926159
},
@@ -33335,7 +33335,7 @@
3333533335
"code": "explicit-override",
3333633336
"column": 4,
3333733337
"message": "Method \"visit_ellipsis_type\" is not using @override but is overriding a method in class \"mypy.type_visitor.SyntheticTypeVisitor\"",
33338-
"offset": 6,
33338+
"offset": 8,
3333933339
"src": "def visit_ellipsis_type(self, t: EllipsisType) -> str:",
3334033340
"target": "mypy.types.TypeStrVisitor.visit_ellipsis_type"
3334133341
},
@@ -33763,7 +33763,7 @@
3376333763
"code": "no-any-expr",
3376433764
"column": 28,
3376533765
"message": "Expression type contains \"Any\" (has type \"list[str | Any]\")",
33766-
"offset": 464,
33766+
"offset": 470,
3376733767
"src": "docstr_repr = \"\\n\".join(re.split(r\"(?<=[^\\\\])\\\\n\", repr(docstr)))",
3376833768
"target": "mypy.util.quote_docstring"
3376933769
}

runtests.py

+2
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@
4848
# time to run.
4949
cmds = {
5050
# Self type check
51+
# We do a no-strict compatible check, this is needed because generating a baseline from the head of upstream
52+
# sound very laborious, strict check is in tox.ini
5153
"self": [
5254
executable,
5355
"-m",

tox.ini

+1-3
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,5 @@ commands = pre-commit run --all-files --show-diff-on-failure
5050
description = type check ourselves
5151
commands =
5252
python runtests.py self
53-
# Do a no-strict compatible check, this is needed because generating a baseline from the head of upstream
54-
# sound very laborious
55-
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
53+
python -m mypy --config-file mypy_self_check_strict.ini -p mypy -p mypyc
5654
python -m mypy --config-file mypy_self_check.ini misc --exclude misc/sync-typeshed.py

0 commit comments

Comments
 (0)