Skip to content
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

Change mypy session to log all errors. #2315

Merged
merged 1 commit into from
Jul 3, 2021
Merged

Conversation

hramezani
Copy link
Member

@hramezani hramezani commented Jul 3, 2021

Closes #1897

@codecov
Copy link

codecov bot commented Jul 3, 2021

Codecov Report

Merging #2315 (47d7395) into main (e22a479) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##              main     #2315   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           25        25           
  Lines         2454      2454           
=========================================
  Hits          2454      2454           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e22a479...47d7395. Read the comment docs.

Copy link
Member

@sethmlarson sethmlarson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So exciting!! Looks like there's a lint failure too.

@@ -159,13 +124,9 @@ def mypy(session):
# Ensure that mypy itself ran successfully
assert process.returncode in (0, 1)

for line in process.stdout.split("\n"):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we change all this logic into a session.run(mypy --strict src/)?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What kind of change do you mean?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of capturing the output of mypy and doing all this filtering we now don't expect any mypy errors so in theory can use session.run() directly?

Copy link
Member

@sethmlarson sethmlarson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing to see a ✅ next to the lint job, great work @hramezani 👏👏👏

@hramezani hramezani merged commit 7483682 into urllib3:main Jul 3, 2021
@hramezani hramezani deleted the clean_mypy branch July 3, 2021 22:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Start shipping our own type stubs
2 participants