Skip to content

Commit

Permalink
chore: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
phil65 committed Nov 14, 2024
1 parent 82efe14 commit 827c457
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 26 deletions.
19 changes: 0 additions & 19 deletions src/githarbor/providers/githubrepository.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,13 +156,6 @@ def download(
destination: str | os.PathLike[str],
recursive: bool = False,
):
"""Download a file from this github repository.
Args:
path: Path to the file we want to download.
destination: Path where file should be saved.
recursive: Download all files from a folder (and subfolders).
"""
user_name = self._gh.get_user().login if TOKEN else None
return githubtools.download_from_github(
org=self._owner,
Expand Down Expand Up @@ -270,18 +263,6 @@ def get_latest_release(
include_drafts: bool = False,
include_prereleases: bool = False,
) -> Release: # Changed from dict[str, Any] to Release
"""Get information about the latest release.
Args:
include_drafts: Whether to include draft releases
include_prereleases: Whether to include pre-releases
Returns:
Release object containing release information
Raises:
ResourceNotFoundError: If no releases are found
"""
releases = self._repo.get_releases()
# Filter releases based on parameters
filtered = [
Expand Down
8 changes: 1 addition & 7 deletions src/githarbor/providers/gitlabrepository.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

import gitlab
from gitlab.exceptions import GitlabAuthenticationError
import upath

from githarbor.core.base import BaseRepository
from githarbor.core.models import (
Expand Down Expand Up @@ -176,13 +175,8 @@ def download(
destination: str | os.PathLike[str],
recursive: bool = False,
):
"""Download a file or directory from this GitLab repository.
import upath

Args:
path: Path to the file or directory we want to download.
destination: Path where file/directory should be saved.
recursive: Download all files from a folder (and subfolders).
"""
dest = upath.UPath(destination)
dest.mkdir(exist_ok=True, parents=True)

Expand Down

0 comments on commit 827c457

Please sign in to comment.