Skip to content

Commit

Permalink
Fix flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
jdawang committed Jan 3, 2024
1 parent 68f04d4 commit 88039d7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
8 changes: 6 additions & 2 deletions edgetest/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,9 @@ def setup(
pkg += f"[{', '.join(extras)}]"
if deps:
LOG.info(
f"Installing specified additional dependencies into {self.envname}: {', '.join(deps)}"
"Installing specified additional dependencies into %s: %s",
self.envname,
", ".join(deps),
)
split = [shlex.split(dep) for dep in deps]
try:
Expand Down Expand Up @@ -185,7 +187,9 @@ def setup(
else:
# Install lower bounds of package(s)
LOG.info(
f"Installing lower bounds of packages in {self.envname}: {', '.join(self.lower)}" # type:ignore
"Installing lower bounds of packages in %s: %s",
{self.envname},
", ".join(self.lower), # type:ignore
)
try:
self.hook.run_install_lower(
Expand Down
9 changes: 5 additions & 4 deletions edgetest/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ def parse_cfg(filename: str = "setup.cfg", requirements: Optional[str] = None) -
pkg_name, output["envs"][-1]["lower"].split("\n")
)
and lower_bound is not None
# TODO: Emit warning or raise error if lower_bound is None but package is in lower
# TODO: Emit warning if lower_bound is None but package is in lower
# TODO: Parse through extra requirements as well to get lower bounds
)
else:
Expand Down Expand Up @@ -365,7 +365,7 @@ def parse_toml(
pkg_name, output["envs"][-1]["lower"].split("\n")
)
and lower_bound is not None
# TODO: Emit warning or raise error if lower_bound is None but package is in lower
# TODO: Emit warning if lower_bound is None but package is in lower
# TODO: Parse through extra requirements as well to get lower bounds
)
elif isinstance(config["edgetest"][section], Table): # type: ignore
Expand Down Expand Up @@ -555,7 +555,8 @@ def get_lower(requirements: str) -> Dict:
Configuration dictionary.
"""
return {
pkg.project_name
+ (f"[{','.join(pkg.extras)}]" if pkg.extras else ""): dict(pkg.specs).get(">=")
pkg.project_name + (f"[{','.join(pkg.extras)}]" if pkg.extras else ""): dict(
pkg.specs
).get(">=")
for pkg in parse_requirements(requirements)
}

0 comments on commit 88039d7

Please sign in to comment.