Skip to content

Commit 91b6e19

Browse files
Illviljanpre-commit-ci[bot]dcherian
authored
Fix mypy errors in core.py (#150)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: dcherian <[email protected]>
1 parent 6218e88 commit 91b6e19

File tree

3 files changed

+219
-176
lines changed

3 files changed

+219
-176
lines changed

.github/workflows/ci-additional.yaml

+40-40
Original file line numberDiff line numberDiff line change
@@ -73,46 +73,46 @@ jobs:
7373
run: |
7474
python -m pytest --doctest-modules flox --ignore flox/tests
7575
76-
# mypy:
77-
# name: Mypy
78-
# runs-on: "ubuntu-latest"
79-
# needs: detect-ci-trigger
80-
# if: needs.detect-ci-trigger.outputs.triggered == 'false'
81-
# defaults:
82-
# run:
83-
# shell: bash -l {0}
84-
# env:
85-
# CONDA_ENV_FILE: ci/environment.yml
86-
# PYTHON_VERSION: "3.10"
76+
mypy:
77+
name: Mypy
78+
runs-on: "ubuntu-latest"
79+
needs: detect-ci-trigger
80+
if: needs.detect-ci-trigger.outputs.triggered == 'false'
81+
defaults:
82+
run:
83+
shell: bash -l {0}
84+
env:
85+
CONDA_ENV_FILE: ci/environment.yml
86+
PYTHON_VERSION: "3.10"
8787

88-
# steps:
89-
# - uses: actions/checkout@v3
90-
# with:
91-
# fetch-depth: 0 # Fetch all history for all branches and tags.
88+
steps:
89+
- uses: actions/checkout@v3
90+
with:
91+
fetch-depth: 0 # Fetch all history for all branches and tags.
9292

93-
# - name: set environment variables
94-
# run: |
95-
# echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
96-
# - name: Setup micromamba
97-
# uses: mamba-org/provision-with-micromamba@34071ca7df4983ccd272ed0d3625818b27b70dcc
98-
# with:
99-
# environment-file: ${{env.CONDA_ENV_FILE}}
100-
# environment-name: xarray-tests
101-
# extra-specs: |
102-
# python=${{env.PYTHON_VERSION}}
103-
# cache-env: true
104-
# cache-env-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"
105-
# - name: Install xarray
106-
# run: |
107-
# python -m pip install --no-deps -e .
108-
# - name: Version info
109-
# run: |
110-
# conda info -a
111-
# conda list
112-
# - name: Install mypy
113-
# run: |
114-
# python -m pip install mypy
93+
- name: set environment variables
94+
run: |
95+
echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
96+
- name: Setup micromamba
97+
uses: mamba-org/provision-with-micromamba@34071ca7df4983ccd272ed0d3625818b27b70dcc
98+
with:
99+
environment-file: ${{env.CONDA_ENV_FILE}}
100+
environment-name: xarray-tests
101+
extra-specs: |
102+
python=${{env.PYTHON_VERSION}}
103+
cache-env: true
104+
cache-env-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"
105+
- name: Install xarray
106+
run: |
107+
python -m pip install --no-deps -e .
108+
- name: Version info
109+
run: |
110+
conda info -a
111+
conda list
112+
- name: Install mypy
113+
run: |
114+
python -m pip install mypy
115115
116-
# - name: Run mypy
117-
# run: |
118-
# python -m mypy --install-types --non-interactive
116+
- name: Run mypy
117+
run: |
118+
python -m mypy --install-types --non-interactive

flox/aggregations.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ def _initialize_aggregation(
467467
func: str | Aggregation,
468468
array_dtype,
469469
fill_value,
470-
min_count: int,
470+
min_count: int | None,
471471
finalize_kwargs,
472472
) -> Aggregation:
473473
if not isinstance(func, Aggregation):

0 commit comments

Comments
 (0)