-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This has two main goals: 1. Move all validation that does not depend on the task we're annotating from `_AnnotationMapper` and to `DetectorFunctionSpec`. This a) splits the code into more manageable chunks, and b) works better with the agent workflow, because the CLI `function` commands can reject an invalid function spec immediately (rather than waiting until the first request). (Frankly, I don't know why I didn't put this code in `DetectorFunctionSpec` in the first place, given that it implements the restrictions described in the docstring...) Validating the spec upon construction requires that the spec is not modified afterwards. This has always been my intention, but to make it clearer, state it explicitly in the docstring. 2. Restructure the rest of the code into smaller functions. This should not introduce any differences in behavior.
- Loading branch information
Showing
5 changed files
with
294 additions
and
249 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.