Runcommands

Latest version: v1.0a71

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

Scan your dependencies

Page 5 of 13

1.0a49

- Fixed normalization of default args read from config file. Command and arg
names are now normalized immediately as they're read from config instead of
merging them all together and then normalizing them. This ensures all the
default args are consistently and correctly merged.

1.0a48

- Fixed an issue with positional args that have a default value and
`nargs=N`. Previously, `nargs` would be set to `*` or `?` (depending
on whether the arg is a container type or not), but that doesn't work
when `nargs=N`. Such args are now converted to options and must be
passed via `--arg ...` from the command line.

1.0a47

- Fixed/improved handling of args in `Command.__call__()` and `Command.run()`.
In particular, handle args as much as possible as they would be when doing
a normal call, with the primary difference being that positionals can have
default values.
- Improved normalization of command names. In particular, it was previously
possible to call a command named `xyz` as `XYZ` on the command line since
command-line args were always lower-cased when checking to see if they were
command names.
- Added the option to specify a default value for a command's var args.
- Added `background` flag to `local` command. This provides an easy way to run
a command as a background process (e.g., a file watcher).

1.0a46

- Fixed an issue with default args being added to globals breaking
interpolation. Instead of adding the default to globals so that they can be
added to commands' default args (if requested), they're now added directly
to commands' default args (when requested). When they're added to globals,
that can cause circularity issues when interpolating.

1.0a45

- Fixed handling of default args for var args (`*args`).
- Added `default_args` to globals so commands can request their own and other
commands' default args by adding a `default_args` arg. This allows, for
example, setting a default arg for a command that another command can then
access via `default_args` instead of duplicating the arg for both commands or
adding the arg to globals.

1.0a44

- Fixed a couple regressions regarding default args introduced in 1.0a40:
- Add globals to keyword args for commands that have `**kwargs`.
- Track args that came from defaults.
- Fixed/improved handling of args in `Command.__call__()` introduced in 1.0a40:
- Ensure positional args can be passed via keyword args.
- Ensure optional args can be passed positionally.
- Fixed `complete` command so it doesn't show command usage when parsing args.
- Added `make-dist` and `upload-dists` commands.
- Revamped `Printer` utility.

Page 5 of 13

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.