Runcommands

Latest version: v1.0a71

Safety actively analyzes 631274 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 6 of 13

1.0a43

- Fixed some issues with parsing short option group, especially during the
initial partitioning of `argv`:
- Made sure the last option in a short option group gets a value.
- Stopped reparsing `run` args for short option groups since they're parsed
when partitioning `argv`.
- Moved parsing of short option groups for commands to an earlier point in
the process so it's possible to tell if help was requested if the help
option was passed as part of a multi short option group.

1.0a42

- Improved `release` command.

1.0a41

- The `run` console script alias is now installed by default along with the
`runcommand` and `runcommands` aliases. The `RUNCOMMANDS_CONSOLE_SCRIPTS`
environment variable can be used to specify different aliases or to disable
installation of the RunCommands console script altogether.
- The `RUNCOMMANDS_INSTALL_COMPLETE_CONSOLE_SCRIPT` environment variable can be
used to *disable* the installation of the `runcommands-complete` console
script.
- The `RUNCOMMANDS_INSTALL_RELEASE_CONSOLE_SCRIPT` environment variable can be
used to *enable* installation of the `make-release` console script.
- Fixed regular expression used to check long options (again). This time, add
support for `--multiple-words`.
- Improved parsing of multi short options. In particular, added support for
specifying a value for the last option in the group: `-xyzValue`.
- Improved partitioning of initial `argv`:
- `argv` is now partitioned into `run` args versus commands and their args by
finding the first non-option word. This allows for better, more intuitive
feedback when bad args are passed to `run` (allowing `argparse` to do its
validation instead of aborting with an unhelpful error).
- In addition, don't attempt to parse *every* arg in `argv` as a multi short
option. Only attempt to parse those that appear to be `run` args (i.e.,
those before the first non-option word).
- Added option to pass a minimum hash length via the `git-version` command's
`--short` option. `--short` by itself, as a flag, means let git determine the
minimum has length. `--short=N` means use `N` as the minimum.

1.0a40

- Added support for commands with subcommands (like `git log`).
- Added support for mutually exclusive command args. Corresponds to
`argparse.ArgumentParser.add_mutually_exclusive_group()`.
- Added support for positional args that have a default value. These are args
that you want to pass positionally but that are optional.
- Added `release` command to built-in commands.
- Removed `collect_commands()` utility function. It was too magical without
providing much benefity.
- The `run` console script is now only installed when an active virtualenv is
detected (indicated by the presence of the `VIRTUAL_ENV` environment
variable). "Run" is pretty generic and only installing `run` in virtualenvs
is intended to reduce the possibility of conflicts.
- The `runcmd` console script is no longer installed. It was a not-very-useful
alias.
- Improved internals, esp. wrt. handling of positional args.

1.0a39

- Added support for positional args that have a default value. Includes
handling of `choices` args when no choice is passed.
- Fixed conversion of list-arg-to-tuple for cases where arg doesn't exist on
command. This can happen when, for example, a command is run with `run
--debug` and the command doesn't have a `debug` arg.
- Added check to ensure long options are valid. Short options were already
being checked.
- Added the option to pass enum choices via `choices` rather than via `type`.
Using `choices` is more natural. The reason `type` was used initially is
because such enums are passed to `argparse.add_argument()` as the type
converter.

1.0a38

- Support Python 3.8.
- Don't attempt to parse command args after `--` as multi short options. Args
after `--` should be passed verbatim.
- When determining if help was requested for a command, ignore args after `--`.
Args after `--` aren't command options.

Page 6 of 13

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.