Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Aug 5, 2024
1 parent 4a93dbf commit 7179abc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
3 changes: 1 addition & 2 deletions grayskull/strategy/abstract_strategy.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@
class AbstractStrategy(metaclass=ABCMeta):
@staticmethod
@abstractmethod
def fetch_data(recipe, config, sections=None):
...
def fetch_data(recipe, config, sections=None): ...
7 changes: 4 additions & 3 deletions grayskull/strategy/py_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -678,9 +678,10 @@ def download_sdist_pkg(sdist_url: str, dest: str, name: Optional[str] = None):
response = requests.get(sdist_url, allow_redirects=True, stream=True, timeout=5)
response.raise_for_status()
total_size = int(response.headers.get("Content-length", 0))
with manage_progressbar(max_value=total_size, prefix=f"{name} ") as bar, open(
dest, "wb"
) as pkg_file:
with (
manage_progressbar(max_value=total_size, prefix=f"{name} ") as bar,
open(dest, "wb") as pkg_file,
):
progress_val = 0
chunk_size = 512
for chunk_data in response.iter_content(chunk_size=chunk_size):
Expand Down

0 comments on commit 7179abc

Please sign in to comment.