Skip to content

Set show_error_codes = True in mypy-strict.ini#56616

Closed
samestep wants to merge 1 commit intopytorch:masterfrom
samestep:mypy-strict-show-error-codes
Closed

Set show_error_codes = True in mypy-strict.ini#56616
samestep wants to merge 1 commit intopytorch:masterfrom
samestep:mypy-strict-show-error-codes

Conversation

@samestep
Copy link
Copy Markdown
Contributor

@samestep samestep commented Apr 21, 2021

This should make it easier to resolve issues surfaced by #56290. Also see #56559 (comment) for context.

Test plan:

You could add a type error in a strict-checked file like tools/test_history.py, and then run this command:

$ mypy --config=mypy-strict.ini tools/test_history.py

Output before this PR:

tools/test_history.py:13:1: error: Function is missing a type annotation for one or more arguments
Found 1 error in 1 file (checked 1 source file)

Output after this PR:

tools/test_history.py:13:1: error: Function is missing a type annotation for one or more arguments  [no-untyped-def]
Found 1 error in 1 file (checked 1 source file)

@samestep samestep requested a review from a team April 21, 2021 19:54
@facebook-github-bot
Copy link
Copy Markdown
Contributor

facebook-github-bot commented Apr 21, 2021

💊 CI failures summary and remediations

As of commit ea8376d (more details on the Dr. CI page):


💚 💚 Looks good so far! There are no failures yet. 💚 💚


This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.

Please report bugs/suggestions to the (internal) Dr. CI Users group.

@samestep samestep requested a review from driazati April 21, 2021 19:54
@facebook-github-bot
Copy link
Copy Markdown
Contributor

@samestep has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Copy Markdown
Contributor

@samestep merged this pull request in 284e735.

@samestep samestep deleted the mypy-strict-show-error-codes branch April 21, 2021 20:26
krshrimali pushed a commit to krshrimali/pytorch that referenced this pull request May 19, 2021
Summary:
This should make it easier to resolve issues surfaced by pytorch#56290. Also see pytorch#56559 (comment) for context.

Pull Request resolved: pytorch#56616

Test Plan:
You could add a type error in a strict-checked file like `tools/test_history.py`, and then run this command:
```
$ mypy --config=mypy-strict.ini tools/test_history.py
```

Output before this PR:
```
tools/test_history.py:13:1: error: Function is missing a type annotation for one or more arguments
Found 1 error in 1 file (checked 1 source file)
```

Output after this PR:
```
tools/test_history.py:13:1: error: Function is missing a type annotation for one or more arguments  [no-untyped-def]
Found 1 error in 1 file (checked 1 source file)
```

Reviewed By: driazati

Differential Revision: D27918753

Pulled By: samestep

fbshipit-source-id: 953926e019a7669da9004fd54498b414aec777a6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants