Skip to content
This repository was archived by the owner on Oct 24, 2025. It is now read-only.
This repository was archived by the owner on Oct 24, 2025. It is now read-only.

Python files from unrelated modules present when using package: individually #444

@jimpudar

Description

@jimpudar

I'm expecting my final module's zip file to include something like:

package_name/app.py
package_name/file.py
tests/test_package_name.py
.flake8
.pylintrc
...

but I'm also seeing files from unrelated modules:

SomeUnrelatedModule/is_showing_up/app.py
OtherUnrelatedModule/something_saas_function/app.py
package_name/app.py
package_name/file.py
tests/test_package_name.py
.flake8
.pylintrc
...

The regex in this filter expression appears to be too general:
https://github.com/UnitedIncome/serverless-python-requirements/blob/master/lib/inject.js#L70

I'm getting files from unrelated modules which match this regex, e.g.
OtherModule/some_cool_function_is_matching/the_regex.py

I don't fully understand the purpose of that regex in the filter, but my assumption is that rather than s_.*\.py it should be ^s_.*\.py.

If this is the case let me know and I can raise a PR to correct the regex.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions