Skip to content

1.1

Compare
Choose a tag to compare
@simonw simonw released this 16 Jul 01:12
· 16 commits to main since this release
  • New --check option, which will return a non-zero exit code if the tool finds any matching symbols. This is designed to be used with Continuous Integration tools, where it can do things like detect if any functions have been added without docstrings by running symbex --function --undocumented --check.

    --check will not output anything by default. Add --count to output a count of matching symbols, or -s/--signatures to output the signatures of the matching symbols.

  • New --rexec SHELL_COMMAND option, which can specify a shell command to be run for a single matching symbol in order to replace its body with the output of that command. This can be used with LLM to use language models to modify code in-place, for example:

    symbex my_function \
      --rexec "llm --system 'add type hints and a docstring'"

    This will add type hints and a generated docstring to the my_function function.