Skip to content

Commit edb3d8c

Browse files
committed
ignoring mypy errors
1 parent b98da97 commit edb3d8c

File tree

3 files changed

+17
-10
lines changed

3 files changed

+17
-10
lines changed

.github/workflows/ci-cd.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ jobs:
2323
defaults:
2424
run:
2525
shell: bash -l {0}
26+
env:
27+
PIP_BREAK_SYSTEM_PACKAGES: 1
2628
steps:
2729
- name: Checkout
2830
uses: actions/checkout@v2
@@ -39,15 +41,13 @@ jobs:
3941
with:
4042
python-version: ${{ matrix.python-version }}
4143
- name: Update build tools
42-
run: python3 -m pip install --break-system-packages --upgrade pip
44+
run: python3 -m pip install --upgrade pip
4345
- name: Install Package
44-
run: python3 -m pip install --break-system-packages -e .[test]
46+
run: python3 -m pip install -e .[test]
4547
- name: Install Extras Package
46-
run: python3 -m pip install --break-system-packages -e ./extras[test]
47-
- name: Install types
48-
run: PIP_BREAK_SYSTEM_PACKAGES=1 mypy --install-types --non-interactive .
48+
run: python3 -m pip install -e ./extras[test]
4949
- name: MyPy
50-
run: mypy .
50+
run: mypy --install-types --non-interactive .
5151
- name: Pytest
5252
run: pytest -vvs --cov fileformats --cov-config .coveragerc --cov-report xml .
5353
- name: Upload coverage to Codecov

.pre-commit-config.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,10 @@ repos:
3030
rev: v1.11.2
3131
hooks:
3232
- id: mypy
33+
args:
34+
[
35+
--strict,
36+
--install-types,
37+
--non-interactive,
38+
--no-warn-unused-ignores,
39+
]

extras/fileformats/extras/application/archive.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def extract_tar(
123123
compression_type: str = "*",
124124
) -> Path:
125125

126-
if extract_dir is attrs.NOTHING:
126+
if extract_dir is attrs.NOTHING: # type: ignore[comparison-overlap]
127127
extract_dir = Path(tempfile.mkdtemp())
128128
else:
129129
extract_dir = extract_dir.absolute()
@@ -167,10 +167,10 @@ def create_zip(
167167
"Can only archive file-sets with single paths currently"
168168
)
169169

170-
if out_file is attrs.NOTHING:
170+
if out_file is attrs.NOTHING: # type: ignore[comparison-overlap]
171171
out_file = Path(Path(in_file).name + ".zip")
172172

173-
if base_dir is attrs.NOTHING:
173+
if base_dir is attrs.NOTHING: # type: ignore[comparison-overlap]
174174
base_dir = Path(in_file).parent
175175

176176
out_file = out_file.absolute()
@@ -212,7 +212,7 @@ def create_zip(
212212
@pydra.mark.annotate({"return": {"out_file": Path}}) # type: ignore[misc]
213213
def extract_zip(in_file: Zip, extract_dir: Path) -> Path:
214214

215-
if extract_dir is attrs.NOTHING:
215+
if extract_dir is attrs.NOTHING: # type: ignore[comparison-overlap]
216216
extract_dir = Path(tempfile.mkdtemp())
217217
else:
218218
extract_dir = extract_dir.absolute()

0 commit comments

Comments
 (0)