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
11 changes: 5 additions & 6 deletions aws_lambda_builders/workflows/python_pip/packager.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,8 @@ def _has_at_least_one_package(self, filename):
# actually being specified, but those aren't common
# cases.
for line in f:
line = line.strip()
if line and not line.startswith("#"):
stripped_line = line.strip()
if stripped_line and not stripped_line.startswith("#"):
return True
return False

Expand Down Expand Up @@ -296,11 +296,10 @@ def _download_dependencies(self, directory, requirements_filename):
for package in deps:
if package.dist_type == "sdist":
sdists.add(package)
elif self._is_compatible_wheel_filename(package.filename):
compatible_wheels.add(package)
else:
if self._is_compatible_wheel_filename(package.filename):
compatible_wheels.add(package)
else:
incompatible_wheels.add(package)
incompatible_wheels.add(package)
LOG.debug("initial compatible: %s", compatible_wheels)
LOG.debug("initial incompatible: %s", incompatible_wheels | sdists)

Expand Down
15 changes: 7 additions & 8 deletions aws_lambda_builders/workflows/ruby_bundler/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,12 @@ def __init__(self, source_dir, artifacts_dir, scratch_dir, manifest_path, runtim
# clean up the dependencies first
self.actions.append(CleanUpAction(self.dependencies_dir))
self.actions.append(CopyDependenciesAction(source_dir, artifacts_dir, self.dependencies_dir))
else:
elif self.dependencies_dir:
# if dependencies folder exists and not download dependencies, simply copy the dependencies from the
# dependencies folder to artifact folder
if self.dependencies_dir:
self.actions.append(CopySourceAction(self.dependencies_dir, artifacts_dir))
else:
LOG.info(
"download_dependencies is False and dependencies_dir is None. Copying the source files into the "
"artifacts directory. "
)
self.actions.append(CopySourceAction(self.dependencies_dir, artifacts_dir))
else:
LOG.info(
"download_dependencies is False and dependencies_dir is None. Copying the source files into the "
"artifacts directory. "
)
2 changes: 1 addition & 1 deletion requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ pyelftools~=0.29 # Used to verify the generated Go binary architecture in integr

# formatter
black==23.1.0
ruff==0.0.247
ruff==0.0.254