Skip to content

Commit

Permalink
Add mypy pre-commit hook (#136)
Browse files Browse the repository at this point in the history
* Add mypy pre-commit hook

* Change precommit default python version to 3.7

* Remove python 3.6 from build matrix

* Add types-PyYAML to mypy hook requiments

* Fix type hints

* Update setup.py (remove python 3.6)
  • Loading branch information
prusse-martin authored Mar 7, 2022
1 parent 930da01 commit a3d1e09
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,9 @@ jobs:
strategy:
fail-fast: false
matrix:
tox_env: ["py36", "py37", "py38", "py39", "py310"]
tox_env: ["py37", "py38", "py39", "py310"]
os: [ubuntu-latest, windows-latest]
include:
- tox_env: "py36"
python: "3.6"
- tox_env: "py37"
python: "3.7"
- tox_env: "py38"
Expand Down
7 changes: 6 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
default_language_version:
python: python3.6
python: python3.7
repos:
- repo: https://github.com/psf/black
rev: 22.1.0
Expand All @@ -11,6 +11,11 @@ repos:
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.931
hooks:
- id: mypy
additional_dependencies: [types-PyYAML]
- repo: local
hooks:
- id: rst
Expand Down
3 changes: 2 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

import sys
import os
from typing import Dict

# If extensions (or modules to document with autodoc) are in another
# directory, add these directories to sys.path here. If the directory is
Expand Down Expand Up @@ -193,7 +194,7 @@

# -- Options for LaTeX output ------------------------------------------

latex_elements = {
latex_elements: Dict[str, str] = {
# The paper size ('letterpaper' or 'a4paper').
#'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
Expand Down

0 comments on commit a3d1e09

Please sign in to comment.