-
-
Notifications
You must be signed in to change notification settings - Fork 0
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
test mypy ignore note refactor retry (true) #30
base: master
Are you sure you want to change the base?
Changes from all commits
cec24f4
8f22923
9a407f5
5fd9c2e
bc2592a
833b209
8c3e621
ba7e91a
02b9eb4
6e9622c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: reviewdog | ||
on: [push, pull_request] | ||
jobs: | ||
mypy: | ||
name: runner / mypy | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
- name: Setup python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9 | ||
- name: Select reporter | ||
uses: haya14busa/action-cond@v1 | ||
id: reporter | ||
with: | ||
cond: ${{ github.event_name == 'pull_request' }} | ||
if_true: "github-pr-review" | ||
if_false: "github-check" | ||
- name: Lint mypy | ||
uses: tsuyoshicho/action-mypy@refactor/ignorenote | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
reporter: ${{ steps.reporter.outputs.value }} | ||
level: warning | ||
fail_on_error: true | ||
workdir: "./src" | ||
ignore_note: true |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[mypy] | ||
warn_no_return = False |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
from typing import Literal, overload | ||
import pytest | ||
|
||
|
||
class Superclass: | ||
@property | ||
def name(self) -> str: | ||
return 'xyz' | ||
|
||
class Subclass(Superclass): | ||
@property | ||
def name(self) -> int: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 [mypy] reported by reviewdog 🐶 |
||
return 123 | ||
|
||
|
||
def test_approx(): | ||
assert 0 == pytest.approx(0) | ||
|
||
|
||
class Someclass: | ||
@overload | ||
def method(self, arg1: Literal['html']) -> None: ... | ||
@overload | ||
def method(self, arg1: Literal['xml']) -> None: ... | ||
@overload | ||
def method(self, arg1: Literal['text']) -> None: ... | ||
@overload | ||
def method(self, arg1: str) -> None: ... | ||
def method(self, arg1): | ||
pass | ||
|
||
a = Someclass() | ||
a.method(123) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 [mypy] reported by reviewdog 🐶 |
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.
🚫 [mypy] reported by reviewdog 🐶
Cannot find implementation or library stub for module named "pytest" [import]