Skip to content

Commit

Permalink
Fix style issues (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
tsalo authored Nov 27, 2024
1 parent 5546b33 commit 4e15f90
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 9 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Publish Docker image

on:
push:
branches: [main]
release:
types: [published]
branches: [ignore]
# release:
# types: [published]

jobs:
push_to_registry:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
_version.py
.vscode
.DS_Store
.*.swp
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ build-backend = "hatchling.build"
name = "fmripost-template"
description = 'A template tool for postprocessing fMRIPrep derivatives'
readme = "README.md"
requires-python = ">=3.11"
requires-python = ">=3.10"
license = {file = "LICENSE"}
keywords = []
authors = [{name = "The NiPreps Developers", email = "[email protected]"}]
Expand Down
2 changes: 1 addition & 1 deletion src/fmripost_template/cli/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ def main():

if sentry_sdk is not None and failed_reports:
sentry_sdk.capture_message(
'Report generation failed for %d subjects' % failed_reports,
f'Report generation failed for {failed_reports} subjects',
level='error',
)
sys.exit(int((errno + len(failed_reports)) > 0))
Expand Down
6 changes: 3 additions & 3 deletions src/fmripost_template/cli/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"""Version CLI helpers."""

from contextlib import suppress
from datetime import UTC, datetime
from datetime import datetime, timezone
from pathlib import Path

import requests
Expand All @@ -41,7 +41,7 @@ def check_latest():
latest = None
date = None
outdated = None
now = datetime.now(tz=UTC)
now = datetime.now(tz=timezone.utc)
cachefile = Path.home() / '.cache' / 'fmripost_template' / 'latest'
try:
cachefile.parent.mkdir(parents=True, exist_ok=True)
Expand All @@ -56,7 +56,7 @@ def check_latest():
else:
try:
latest = Version(latest)
date = datetime.strptime(date, DATE_FMT).astimezone(UTC)
date = datetime.strptime(date, DATE_FMT).astimezone(timezone.utc)
except (InvalidVersion, ValueError):
latest = None
else:
Expand Down
2 changes: 1 addition & 1 deletion src/fmripost_template/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
# Just get so analytics track one hit
from contextlib import suppress

from requests import ConnectionError, ReadTimeout
from requests import ConnectionError, ReadTimeout # noqa: A004
from requests import get as _get_url

with suppress((ConnectionError, ReadTimeout)):
Expand Down

0 comments on commit 4e15f90

Please sign in to comment.