Better-support mypy strict equality flag#8799
Conversation
CodSpeed Performance ReportMerging #8799 will not alter performanceComparing Summary
|
sydney-runkle
left a comment
There was a problem hiding this comment.
Approved, assuming tests pass
Deploying with
|
| Latest commit: |
d15cbcd
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://1271a568.pydantic-docs2.pages.dev |
| Branch Preview URL: | https://dmontagu-strict-equality-typ.pydantic-docs2.pages.dev |
| existing_output_code = test_config.existing.output_path.read_text() | ||
| print(f'Comparing output with {test_config.existing.output_path}') | ||
| else: | ||
| print('Expecting no mypy errors') |
There was a problem hiding this comment.
wasted some time confused by the lack of this message
| print('**** Merged Output ****') | ||
| print(merged_output) | ||
| print('***********************') |
There was a problem hiding this comment.
this was helpful for debugging, and I don't see much reason not to include it
| continue | ||
| try: | ||
| line_number, message = line.split(':', maxsplit=1) | ||
| line_number, message = re.split(r':(?:\d+:)?', line, maxsplit=1) |
There was a problem hiding this comment.
I'm not sure if this is just a python 3.12 thing, but I was running into an issue where the messages had two numbers, like, 9:7: error: Non-overlapping equality check (left operand type: "User", right operand type: "Literal['test']") [comparison-overlap]. I think the second number is the character index. Considering this happened for me locally but I don't think it does in CI, it seems best to just prepare for it to be present in some cases and not others and split that off like this if present.
Closes #8773