Skip to content

Use absolute path construction in _process_slce_extra default parameter#177

Merged
sarthak shaha (Sarthak-Shaha) merged 2 commits intopkgmgr/upload_packagefrom
copilot/sub-pr-166
Nov 4, 2025
Merged

Use absolute path construction in _process_slce_extra default parameter#177
sarthak shaha (Sarthak-Shaha) merged 2 commits intopkgmgr/upload_packagefrom
copilot/sub-pr-166

Conversation

Copy link
Contributor

Copilot AI commented Nov 4, 2025

Addresses feedback from #166 to ensure _process_slce_extra constructs paths relative to self.repo_root regardless of execution context.

Changes

  • Changed default parameter from filename: str = "packages/matter/matter.slce.extra" to filename: Optional[str] = None
  • Construct absolute path inside function body using os.path.join(self.repo_root, "packages/matter/matter.slce.extra") when no filename provided
  • Preserve existing behavior when explicit filename is passed (still joined with self.repo_root)
def _process_slce_extra(self, filename: Optional[str] = None) -> dict:
    if filename is None:
        filename = os.path.join(self.repo_root, "packages/matter/matter.slce.extra")
    else:
        filename = os.path.join(self.repo_root, filename)

This eliminates ambiguity around relative path resolution and makes the path construction explicit and deterministic.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: Sarthak-Shaha <130495524+Sarthak-Shaha@users.noreply.github.com>
Copilot AI changed the title [WIP] Update artifactory upload package based on review feedback Use absolute path construction in _process_slce_extra default parameter Nov 4, 2025
@Sarthak-Shaha sarthak shaha (Sarthak-Shaha) marked this pull request as ready for review November 4, 2025 21:07
@Sarthak-Shaha sarthak shaha (Sarthak-Shaha) merged commit 7694064 into pkgmgr/upload_package Nov 4, 2025
@Sarthak-Shaha sarthak shaha (Sarthak-Shaha) deleted the copilot/sub-pr-166 branch November 4, 2025 21:07
Rehan Rasool (rerasool) pushed a commit to rerasool/matter_extension that referenced this pull request Nov 7, 2025
Merge in WMN_TOOLS/matter_extension from disable_compiler_error_flags to release_2.5-1.4

Squashed commit of the following:

commit 2f5fd202dffe005fcf0cab9cc618a50531b20fb5
Author: Junior Martinez <67972863+jmartinez-silabs@users.noreply.github.com>
Date:   Wed Nov 20 17:07:25 2024 -0500

    add no-unused-parameter flag
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants