Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ jobs:
- name: Run pytest
run: poetry run python -m pytest -p no:sugar -q tests/

- name: Run mypy
run: poetry run mypy

- name: Run pytest (integration suite)
run: poetry run python -m pytest -p no:sugar -q --integration tests/integration

Expand Down
8 changes: 0 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,6 @@ repos:
- id: flake8
additional_dependencies: *flake8_deps

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.950
hooks:
- id: mypy
pass_filenames: false
additional_dependencies:
- types-requests

- repo: https://github.com/pre-commit/pre-commit
rev: v2.18.1
hooks:
Expand Down
7 changes: 7 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,13 @@ $ poetry install
$ poetry run pytest tests/
```

Poetry uses [mypy](https://github.com/python/mypy) for typechecking, and the CI
will fail if it finds any errors. To run mypy locally:

```bash
$ poetry run mypy
```

Poetry uses the [black](https://github.com/psf/black) coding style and you must ensure that your
code follows it. If not, the CI will fail and your Pull Request will not be merged.

Expand Down
7 changes: 7 additions & 0 deletions docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,13 @@ $ poetry install
$ poetry run pytest tests/
```

Poetry uses [mypy](https://github.com/python/mypy) for typechecking, and the CI
will fail if it finds any errors. To run mypy locally:

```bash
$ poetry run mypy
```

Poetry uses the [black](https://github.com/psf/black) coding style and you must ensure that your
code follows it. If not, the CI will fail and your Pull Request will not be merged.

Expand Down
131 changes: 130 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ httpretty = "^1.0"
typing-extensions = { version = "^4.0.0", python = "<3.8" }
zipp = { version = "^3.4", python = "<3.8" }
flatdict = "^4.0.1"
mypy = ">=0.950"
types-requests = ">=2.27.11"

[tool.poetry.scripts]
poetry = "poetry.console.application:main"
Expand Down