Skip to content

Commit

Permalink
Update poetry and fix type error
Browse files Browse the repository at this point in the history
  • Loading branch information
aptinis committed May 13, 2024
1 parent 93a9e7b commit 8a665f3
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ jobs:
- name: Install and configure Poetry
uses: snok/install-poetry@v1
with:
version: 1.1.8
version: 1.8.2
virtualenvs-create: true
- name: Install dependencies
run: |
poetry install --no-root --no-interaction
poetry install --only dev --no-root --no-interaction
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry==1.1.8
pip install poetry==1.8.2
- name: Build and Publish
run: |
poetry config pypi-token.pypi "$PYPI_TOKEN"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/type-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:
- name: "Install Dependencies"
run: |
python -m pip install --upgrade pip
pip install poetry
pip install poetry==1.8.2
poetry config virtualenvs.create false
poetry install --no-interaction --no-dev
poetry install --no-interaction --only main
- name: "Set up Node.js"
uses: actions/setup-node@v4
with:
Expand Down
12 changes: 6 additions & 6 deletions poetry.lock

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

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ python = ">=3.8,<4.0"
d2b = "^1.1.4"
nibabel = "^3.2.1"

[tool.poetry.dev-dependencies]
[tool.poetry.group.dev.dependencies]
black = "^24.4.2"
flake8 = "^3.9.2"
pylint = "^2.10.2"
Expand Down
2 changes: 1 addition & 1 deletion src/d2b_asl.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def json_file(self) -> Path:

def validate(self, asl_file: str | Path):
img: nib.Nifti1Image = nib.load(asl_file)
nvols, nlabels = img.header["dim"][4], len(self.labels)
nvols, nlabels = img.header["dim"][4], len(self.labels) # type: ignore
if nvols != nlabels:
raise AslContextConfigurationError(asl_file, nvols, nlabels)
for label in self.labels:
Expand Down

0 comments on commit 8a665f3

Please sign in to comment.