-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better-support mypy strict equality flag #8799
Conversation
CodSpeed Performance ReportMerging #8799 will not alter performanceComparing Summary
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved, assuming tests pass
Deploying with Cloudflare Pages
|
@@ -192,6 +193,8 @@ def test_mypy_results(config_filename: str, python_filename: str, request: pytes | |||
if test_config.existing is not None: | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wasted some time confused by the lack of this message
print('**** Merged Output ****') | ||
print(merged_output) | ||
print('***********************') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was helpful for debugging, and I don't see much reason not to include it
@@ -279,7 +285,7 @@ def merge_python_and_mypy_output(source_code: str, mypy_output: str) -> str: | |||
if not line: | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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