Skip to content

Commit

Permalink
Minimal mypy setup
Browse files Browse the repository at this point in the history
  • Loading branch information
alanhdu committed May 23, 2023
1 parent bbce5af commit 93518cf
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,22 @@ jobs:
- uses: actions/setup-python@main
- uses: pre-commit/action@main

typecheck:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup conda
uses: mamba-org/provision-with-micromamba@main
with:
environment-file: ci/environment-typecheck.yml

- name: mypy
shell: bash -l {0}
run: |
mypy fsspec
downstream:
name: downstream
runs-on: ubuntu-latest
Expand Down
13 changes: 13 additions & 0 deletions ci/environment-typecheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: test_env
channels:
- conda-forge
dependencies:
- mypy=1.3
- pyarrow
- python=3.8
- pip
- pip:
- types-paramiko
- types-requests
- types-tqdm
- types-ujson
15 changes: 15 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,18 @@ skip=
docs/source/conf.py
versioneer.py
fsspec/_version

[mypy]
follow_imports = normal
ignore_missing_imports = True
enable_error_code = ignore-without-code,truthy-bool,truthy-iterable,unused-awaitable

disallow_untyped_decorators = True
strict_equality = True
warn_redundant_casts = True
warn_unused_configs = True
warn_unused_ignores = True


# don't bother type-checking test_*.py or conftest.py files
exclude = (test_.*|conftest)\.py$

0 comments on commit 93518cf

Please sign in to comment.