Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
python-version: ["3.12", "3.13", "3.14"]
os: [ ubuntu-latest, windows-latest, macos-latest ]
steps:
- uses: actions/checkout@v3
Expand Down
4 changes: 1 addition & 3 deletions isic_cli/cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,7 @@ def main():

click.echo(f'isic-cli: v{get_version() or "-"}', err=True)
click.echo(f"python: v{platform.python_version()}", err=True)
click.echo(
f"time: {datetime.datetime.now(tz=datetime.timezone.utc).isoformat()}", err=True
)
click.echo(f"time: {datetime.datetime.now(tz=datetime.UTC).isoformat()}", err=True)
click.echo(f"os: {platform.platform()}", err=True)
click.echo(f"env: {env}", err=True)
click.echo(f"user: {user}", err=True)
Expand Down
2 changes: 1 addition & 1 deletion isic_cli/cli/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def cleanup_partially_downloaded_files(directory: Path) -> None:
# its final destination after listing it but before unlinking.
try:
p.unlink(missing_ok=True)
except PermissionError: # noqa: PERF203
except PermissionError:
# frequently on windows this is raised. it appears like this could be caused by
# antivirus or various indexers that attempt to use the file shortly after it's
# created.
Expand Down
16 changes: 12 additions & 4 deletions isic_cli/cli/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def convert(self, value, param, ctx):
for collection_id in collection_ids:
try:
get_collection(ctx.obj.session, collection_id)
except HTTPError as e: # noqa: PERF203
except HTTPError as e:
if e.response.status_code == 404:
append = ""
if not ctx.obj.user:
Expand Down Expand Up @@ -82,13 +82,19 @@ def convert(self, value: str, param, ctx) -> str:
except HTTPError as e:
if e.response.status_code == 404:
self.fail(
f"Collection {value} does not exist or you don't have access to it.", param, ctx
f"Collection {value} does not exist or you don't have access to it.",
param,
ctx,
)
else:
raise

if collection["locked"] and not self.locked_okay:
click.secho(f'"{collection["name"]}" is locked for modifications.', err=True, fg="red")
click.secho(
f'"{collection["name"]}" is locked for modifications.',
err=True,
fg="red",
)
sys.exit(1)

return value
Expand All @@ -105,7 +111,9 @@ def convert(self, value: str, param, ctx) -> str:
except HTTPError as e:
if e.response.status_code == 404:
self.fail(
f"Cohort {value} does not exist or you don't have access to it.", param, ctx
f"Cohort {value} does not exist or you don't have access to it.",
param,
ctx,
)
else:
raise
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 = "setuptools.build_meta"

[tool.ruff]
line-length = 100
target-version = "py39"
target-version = "py312"
extend-exclude = ["typings"]

[tool.ruff.lint]
Expand Down
5 changes: 2 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,12 @@
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python",
],
python_requires=">=3.10",
python_requires=">=3.12",
packages=find_packages(),
entry_points={"console_scripts": ["isic = isic_cli.cli:main"]},
install_requires=[
Expand Down
Loading