Skip to content

Commit

Permalink
build: add mypy (optional) (#437)
Browse files Browse the repository at this point in the history
  • Loading branch information
joseph-sentry committed May 16, 2024
1 parent 242e1a0 commit 0862b20
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: "Patch typing check"

on:
push:
branches:
- main
- staging
pull_request:
merge_group:

jobs:
patch-typing-check:
name: Run Patch Type Check
uses: codecov/gha-workflows/.github/workflows/mypy.yml@v1.2.18
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,9 @@ repos:
pass_filenames: false
require_serial: true
language: system
- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v1.10.0'
hooks:
- id: mypy
verbose: true
entry: bash -c 'mypy "$@" || true' --
7 changes: 7 additions & 0 deletions mypy.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Global options:

[mypy]
disallow_untyped_defs = True
ignore_missing_imports = True
disable_error_code = attr-defined,import-untyped,name-defined
follow_imports = silent

0 comments on commit 0862b20

Please sign in to comment.