Skip to content

Export the GlobalExcludeArg normalizer - #37

Merged
shellygr merged 1 commit into
masterfrom
shelly/public-exclude-pred
Sep 4, 2026
Merged

Export the GlobalExcludeArg normalizer#37
shellygr merged 1 commit into
masterfrom
shelly/public-exclude-pred

Conversation

@shellygr

@shellygr shellygr commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

make_exclude_pred (was _make_exclude_pred) turns either surface form of a GlobalExcludeArg, the fullmatch regex or the callable, into a single exclude predicate. It was private, so anyone holding a GlobalExcludeArg who wanted to answer "is this path excluded?" without going through fs_tools had to repeat the regex-vs-callable branch.

Behaviour and signature are unchanged. The two callers in the file are updated, and the docstring now says why it is exported.

The caller that needs it checks agent-authored source paths against the same readability rule the agent's own file tools serve them through.

🤖 Generated with Claude Code

`_make_exclude_pred` is the one place the regex form and the callable form of a
`GlobalExcludeArg` are read. A caller that holds one and wants to ask the
question itself, instead of handing the argument to a tool suite, had to write
that branch again. Make it public.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

@jtoman jtoman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've wanted this myself for other things I've been playing with; thanks for getting to it :D

@shellygr
shellygr merged commit 2177f57 into master Sep 4, 2026
2 checks passed
@shellygr
shellygr deleted the shelly/public-exclude-pred branch September 4, 2026 20:48
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