Skip to content

Commit

Permalink
Typing fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
elprans committed Oct 30, 2024
1 parent dd0f9b6 commit fee006f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 4 additions & 2 deletions metapkg/packages/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,9 @@ def _get_sources(cls, version: str | None) -> list[af_sources.BaseSource]:
dirname=clsdirname,
**cls.get_source_url_variables(version),
)
extras = af_sources.SourceExtraDecl(source.get("extras", {}))
extras = af_sources.SourceExtraDecl(
source.get("extras", {})
) # type: ignore
if extras:
if "version" not in extras:
extras["version"] = version
Expand Down Expand Up @@ -703,7 +705,7 @@ def resolve(
vcs_source = cls.get_vcs_source(io, version)
is_git = vcs_source is not None

if is_git:
if vcs_source is not None:
sources[0] = vcs_source
repo = cls.resolve_vcs_repo(io, version)
if version:
Expand Down
6 changes: 3 additions & 3 deletions metapkg/targets/generic/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -709,21 +709,21 @@ def _package(self, files: list[pathlib.Path]) -> None:

if "zip" in self._compression:
if layout is packages.PackageFileLayout.FLAT:
src = "."
srcdir = "."
else:
os.symlink(
prefix,
image_root / an,
target_is_directory=True,
)
src = an
srcdir = an

tools.cmd(
"zip",
"-9",
"-r",
archives_abs / f"{an}.zip",
src,
srcdir,
cwd=image_root,
)

Expand Down

0 comments on commit fee006f

Please sign in to comment.