Yapx

Latest version: v0.5.2

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

Scan your dependencies

Page 2 of 3

0.3.0

:clap: Features

- Add vanity arg methods; counting_arg, feature_arg, unbounded_arg [135c34c]
- *Breaking:* `yapx.Context` used instead of `_relay_value` [a93341a]

:fist: Fixes

- Refactor to ensure `parse_args` is called only once [a401a4f]
- Dict annotation returning empty list when empty arg given [47dcd49]
- Restore ability to suppress tui option [223ba03]

:point_right: Changes

- *Breaking:* Positional args to `yapx.arg(...)` are now considered flags. [8a5540f]
- *Breaking:* `*args` and `**kwargs` are populated by unknown args [1338dcd]
- Only show defaults in help text if not null or empty [bc60880]

SLOC Analysis:

| Directory | Empty | Comment | Docstring | Code | Statements |
|-------------|---------|-----------|-------------|--------|--------------|
| src/yapx | 404 | 51 | 509 | 1804 | 984 |
| tests | 358 | 184 | 251 | 1460 | 738 |

---

0.2.4

:clap: Features

- Add `--tui` parameter to every subparser [1b0eef8]

SLOC Analysis:

| Directory | Empty | Comment | Docstring | Code | Statements |
|-------------|---------|-----------|-------------|--------|--------------|
| src/yapx | 375 | 45 | 341 | 1654 | 935 |
| tests | 332 | 186 | 241 | 1385 | 700 |

---

0.2.3

:fist: Fixes

- Fix parsing of positional arguments with sequence types [231aaee]

---

0.2.2

:clap: Features

- Override add_subparsers defaults [54b88a5]

---

0.2.1

:point_right: Changes

- Use argparse-tui fork of trogon [ce7917c]
- refactor: BooleanOptionalAction [4910820]
- refactor: Small optimizations [e32e101]

---

0.2.0

- better error handling
- optional integration with rich, rich-argparse for prettier output
- support for automatic bool-negation parameters, e.g.: `--flag / --no-flag`
- support for "counting" arguments: `value: Annotated[int, yapx.arg(nargs=0)]`
- support for "feature" arguments: `value: Annotated[str, yapx.arg(nargs=0)]`
- Sequence-types (list, set, dict, etc.) use nargs=1 by default.

Previously, this was the way to populate a list: `--value 1 2 3`

Now, this is the way: `--value 1 --value 2 --value 3`

The prior behavior can still be obtained using: `value: Annotated[List[int], yapx.arg(nargs='*')]`

:clap: Features

- Appended sequences, counting args, feature args, and bool arg negation. [09f315e]
- Improved error handling, prettier output with rich [29d85b3]
- Add `--tui` flag to help [abb5780]
- Add tui as argument or subcommand [839ff27]
- Add `patch_run` [4f07cd0]
- Expose yapx.build_parser, yapx.Namespace, yapx.is_... [79f8d03]
- Command name is optional; is now derived from func/model name [2f00be7]
- Attempt to get prog version [13edbbb]
- Support Pydantic v2 [7b25bc9]

:fist: Fixes

- Casting of Dict value types [4743696]
- Raise ValueError when string not in Enum names [8c2dee5]
- Don't include shtab parameter in parsed args [b8cd492]
- Correct value of counting parameters with no default [a324f35]
- Only add `--version` flag if prog_version is not empty [15c34c1]
- Convert default values of boolean arguments [543c58f]
- Make all helpful flags optional [16a74dc]

:point_right: Changes

- *Breaking:* `build_parser` and rework `run` [bbc7505]
- Inherit appropriate argparse actions [12e3bce]
- Remove tui extra for now [750a6a2]

SLOC Analysis:

| Directory | Empty | Comment | Docstring | Code | Statements |
|-------------|---------|-----------|-------------|--------|--------------|
| src/yapx | 366 | 45 | 322 | 1604 | 909 |
| tests | 332 | 186 | 241 | 1383 | 699 |

---

Page 2 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.