Skip to content

Fix variable shadowing in is_within_directory inner function parameter#43

Merged
rilma merged 2 commits intofeatures/upgrade-ci-cdfrom
copilot/sub-pr-40
Feb 21, 2026
Merged

Fix variable shadowing in is_within_directory inner function parameter#43
rilma merged 2 commits intofeatures/upgrade-ci-cdfrom
copilot/sub-pr-40

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 21, 2026

The directory parameter of the inner function is_within_directory shadowed the outer retrieve function's directory parameter, creating ambiguity and potential for subtle bugs.

Change

Renamed the inner function's parameter from directory to base_dir:

# Before
def is_within_directory(directory, target):
    abs_directory = os.path.abspath(directory)

# After
def is_within_directory(base_dir, target):
    abs_directory = os.path.abspath(base_dir)

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

Co-authored-by: rilma <14822065+rilma@users.noreply.github.com>
Copilot AI changed the title [WIP] WIP to address feedback for CI/CD pipeline upgrades Fix variable shadowing in is_within_directory inner function parameter Feb 21, 2026
Copilot AI requested a review from rilma February 21, 2026 21:32
@rilma rilma marked this pull request as ready for review February 21, 2026 21:38
@rilma rilma merged commit dfa4d22 into features/upgrade-ci-cd Feb 21, 2026
@rilma rilma deleted the copilot/sub-pr-40 branch February 21, 2026 21:38
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