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
12 changes: 6 additions & 6 deletions .github/workflows/ci_workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ jobs:
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1
with:
envs: |
- linux: py39
- macos: py310
- windows: py311
- linux: py312
- linux: py313
- linux: py313-devdeps
- linux: py310
- linux: py311
- macos: py312
- windows: py313
- linux: py314
- linux: py314-devdeps
- linux: py312-conda
toxdeps: tox-conda
- linux: mypy
Expand Down
2 changes: 0 additions & 2 deletions .ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ extend-ignore = [
"F403",
"F821",
"F841",
# pyupgrade (UP)
"UP038", # Use | in isinstance - not compatible with models and is slower
# pytest (PT)
"PT001", # Always use pytest.fixture()
"PT023", # Always use () on pytest decorators
Expand Down
11 changes: 5 additions & 6 deletions parfive/downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,7 @@ async def run_download(self):
task.cancel()
dl_results = await asyncio.gather(*tasks, return_exceptions=True)

finally:
return self._format_results(dl_results, main_pb)
return self._format_results(dl_results, main_pb)

def _format_results(self, retvals, main_pb):
# Squash all nested lists into a single flat list
Expand Down Expand Up @@ -448,7 +447,7 @@ async def _run_http_download(self, main_pb):

try:
# Wait for all the coroutines to finish
done, _ = await asyncio.wait(futures)
_done, _ = await asyncio.wait(futures)
except asyncio.CancelledError:
for task in futures:
task.cancel()
Expand All @@ -464,7 +463,7 @@ async def _run_ftp_download(self, main_pb):

try:
# Wait for all the coroutines to finish
done, _ = await asyncio.wait(futures)
_done, _ = await asyncio.wait(futures)
except asyncio.CancelledError:
for task in futures:
task.cancel()
Expand Down Expand Up @@ -734,7 +733,7 @@ async def _get_http(

return url, str(filepath)

except (Exception, asyncio.CancelledError) as e:
except (Exception, asyncio.CancelledError) as e: # noqa: BLE001
for task in tasks:
task.cancel()
# We have to cancel the writer here before we try and remove the
Expand Down Expand Up @@ -955,7 +954,7 @@ async def _get_ftp(

return url, str(filepath)

except (Exception, asyncio.CancelledError) as e:
except (Exception, asyncio.CancelledError) as e: # noqa: BLE001
if writer is not None:
await cancel_task(writer)
writer = None
Expand Down
2 changes: 1 addition & 1 deletion parfive/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def default_name(path: os.PathLike, resp: aiohttp.ClientResponse, url: str) -> o
if resp:
cdheader = resp.headers.get("Content-Disposition", None)
if cdheader:
value, params = parse_header(cdheader)
_value, params = parse_header(cdheader)
name = params.get("filename", url_filename)
else:
name = url_filename
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "parfive"
description = "A HTTP and FTP parallel file downloader."
requires-python = ">=3.9"
requires-python = ">=3.10"
readme = { file = "README.rst", content-type = "text/x-rst" }
license = { file = "LICENSE" }
authors = [
Expand Down