Skip to content

Commit

Permalink
Fix mypy errors in core.py (#150)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: dcherian <deepak@cherian.net>
  • Loading branch information
3 people authored Oct 6, 2022
1 parent 6218e88 commit 91b6e19
Show file tree
Hide file tree
Showing 3 changed files with 219 additions and 176 deletions.
80 changes: 40 additions & 40 deletions .github/workflows/ci-additional.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,46 +73,46 @@ jobs:
run: |
python -m pytest --doctest-modules flox --ignore flox/tests
# mypy:
# name: Mypy
# runs-on: "ubuntu-latest"
# needs: detect-ci-trigger
# if: needs.detect-ci-trigger.outputs.triggered == 'false'
# defaults:
# run:
# shell: bash -l {0}
# env:
# CONDA_ENV_FILE: ci/environment.yml
# PYTHON_VERSION: "3.10"
mypy:
name: Mypy
runs-on: "ubuntu-latest"
needs: detect-ci-trigger
if: needs.detect-ci-trigger.outputs.triggered == 'false'
defaults:
run:
shell: bash -l {0}
env:
CONDA_ENV_FILE: ci/environment.yml
PYTHON_VERSION: "3.10"

# steps:
# - uses: actions/checkout@v3
# with:
# fetch-depth: 0 # Fetch all history for all branches and tags.
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history for all branches and tags.

# - name: set environment variables
# run: |
# echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
# - name: Setup micromamba
# uses: mamba-org/provision-with-micromamba@34071ca7df4983ccd272ed0d3625818b27b70dcc
# with:
# environment-file: ${{env.CONDA_ENV_FILE}}
# environment-name: xarray-tests
# extra-specs: |
# python=${{env.PYTHON_VERSION}}
# cache-env: true
# cache-env-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"
# - name: Install xarray
# run: |
# python -m pip install --no-deps -e .
# - name: Version info
# run: |
# conda info -a
# conda list
# - name: Install mypy
# run: |
# python -m pip install mypy
- name: set environment variables
run: |
echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
- name: Setup micromamba
uses: mamba-org/provision-with-micromamba@34071ca7df4983ccd272ed0d3625818b27b70dcc
with:
environment-file: ${{env.CONDA_ENV_FILE}}
environment-name: xarray-tests
extra-specs: |
python=${{env.PYTHON_VERSION}}
cache-env: true
cache-env-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"
- name: Install xarray
run: |
python -m pip install --no-deps -e .
- name: Version info
run: |
conda info -a
conda list
- name: Install mypy
run: |
python -m pip install mypy
# - name: Run mypy
# run: |
# python -m mypy --install-types --non-interactive
- name: Run mypy
run: |
python -m mypy --install-types --non-interactive
2 changes: 1 addition & 1 deletion flox/aggregations.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ def _initialize_aggregation(
func: str | Aggregation,
array_dtype,
fill_value,
min_count: int,
min_count: int | None,
finalize_kwargs,
) -> Aggregation:
if not isinstance(func, Aggregation):
Expand Down
Loading

0 comments on commit 91b6e19

Please sign in to comment.