Skip to content

Commit

Permalink
feat(types): Add mypy GitHub problem matcher (#19706)
Browse files Browse the repository at this point in the history
  • Loading branch information
webjunkie authored Jan 17, 2024
1 parent 732f7cc commit fb0562d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/mypy-problem-matcher.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"problemMatcher": [
{
"owner": "mypy",
"severity": "error",
"pattern": [
{
"regexp": "^([^:]*):(\\d+):(?:(\\d+):)? (?:error|note): (.*?)(?: \\[(\\S+)\\])?$",
"file": 1,
"line": 2,
"column": 3,
"message": 4,
"code": 5
}
]
}
]
}
3 changes: 3 additions & 0 deletions .github/workflows/ci-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ jobs:
run: |
ruff format --exclude posthog/hogql/grammar --check --diff .
- name: Add Problem Matcher
run: echo "::add-matcher::.github/mypy-problem-matcher.json"

- name: Check static typing
run: |
mypy -p posthog | mypy-baseline filter
Expand Down

0 comments on commit fb0562d

Please sign in to comment.