Skip to content

Releases: dannystewart/polykit

v0.14.6

20 Nov 13:14
6253c94

Choose a tag to compare

v0.14.5

09 Nov 21:07
9b81ae1

Choose a tag to compare

Added

  • Adds MainActor decorator for thread-safe execution using Swift-inspired actor pattern.
  • Adds AttrDict class for attribute-style dictionary access with nested merging and type safety.

Changed

  • Updates dependency versions with Python version constraints and bumps minimum versions for platformdirs and python-dotenv.
  • Updates development dependencies including mypy, pdoc, pre-commit, and ruff to latest versions.
  • Updates pre-commit hooks to latest versions (ruff v0.14.0, mypy v1.18.2, pre-commit-hooks v6.0.0).
  • Improves text truncation logic by removing redundant variable assignments.
  • Simplifies type ignore comments in attr_dict module.

Full Changelog: v0.14.4...v0.14.5

v0.14.4

20 Sep 17:15
85ccec3

Choose a tag to compare

Added

  • Adds enhanced get_args function that handles TypeAliasType objects automatically without requiring __value__, improving type introspection capabilities for modern Python typing constructs.

Changed

  • Renames is_literal.py to type_utils.py to better accommodate type-related utility functions.

Full Changelog: v0.14.3...v0.14.4

v0.14.3

20 Sep 03:53
ec1ebf1

Choose a tag to compare

Full Changelog: v0.14.2...v0.14.3

v0.14.2

17 Sep 19:00
734dbb7

Choose a tag to compare

Added

  • Adds subparser support to PolyArgs to provide help text capitalization consistent with argument handling.

Full Changelog: v0.14.1...v0.14.2

v0.14.1

13 Sep 12:58
bf39333

Choose a tag to compare

Added

  • Makes end_message in halo_progress optional by passing None, which will clear the spinner without a message for cleaner output when a completion message is not needed.

Changed

  • Updates project dependencies including platformdirs (4.3.8 → 4.4.0), requests (2.32.4 → 2.32.5), ruff (0.12.9 → 0.12.11), and typing-extensions (4.14.1 → 4.15.0).

Full Changelog: v0.14.0...v0.14.1

v0.14.0

13 Sep 12:53
ec09be9

Choose a tag to compare

More breaking changes in this one, reverting the new split class approach to the original approach in 0.12.0 and earlier.

Added

  • Adds comma formatting option to the plural method in PolyNum class, with a new commas parameter (enabled by default).
  • Adds support for date objects in get_pretty_time, allowing date-only formatting, and introduces the get_date_only convenience function.
  • Adds Peacock color customizations with a purple theme for better visual identification of the workspace.

Fixed

  • Fixes help text processing in PolyArgs to preserve uppercase in acronyms, preventing "API" from becoming "aPI" in help messages.

Changed

  • BREAKING: Deprecates PolyText, PolyColors, PolyMoji, PolyNum, PolySplit, and PolyTruncate classes and returns to the previous structure with the Text and Time classes, plus the addition of the Markup class so that Text can be a normal class instead of a StrEnum. Backward compatibility is maintained for now. I realized that the previous attempt at separation caused more headaches than it avoided and is not worth applying that level of granular separation. I'm sorry, mostly to myself, who now has to undo all this across all my other scripts.
  • BREAKING: Renames parameter with_count to show_num in plural methods for better clarity across PolyNum and PolyTime classes.
  • Reverts the more complicated pluralization logic in PolyNum to fix issues like "photoes." Turns out the simpler approach is best.
  • Adds usage guidance for PolyNum.format method, recommending the use of the simpler PolyNum.plural method if pluralization is all you need.
  • Deprecates the html_escape method, recommending the use of html.escape from the standard library instead.
  • Updates development dependencies including mypy (1.17.0 to 1.17.1), ruff (0.12.5 to 0.12.7), distlib, virtualenv, and certifi.

Full Changelog: v0.13.0...v0.14.0

v0.13.0

11 Jul 18:20
4996cf8

Choose a tag to compare

More breaking changes in this one.

Added

  • Adds optional parameters to log_traceback function, making it more flexible in various error handling scenarios.

Changed

  • Renames PolyNumbers to PolyNum for consistency and brevity.
  • Removes capitalize parameter from all methods in PolyNum. You should use standard string capitalization with .capitalize() going forward.
  • Updates dependencies to their latest versions:
    • certifi from 2025.6.15 to 2025.7.9
    • ruff from 0.12.0 to 0.12.3
    • typing-extensions from 4.14.0 to 4.14.1

Removed

  • Removes the deprecated formatters package and its modules (text.py, time.py, types.py) that contained the old Text and Time utility classes.

Fixed

  • Fixes log_traceback to properly handle being used directly as sys.excepthook by checking for None parameters and falling back to sys.exc_info().

Full Changelog: v0.12.0...v0.13.0

v0.12.0b1

25 Jun 13:11
9650ce9

Choose a tag to compare

Full Changelog: v0.11.4...v0.12.0b1

v0.12.0

07 Jul 12:28
7114911

Choose a tag to compare

Releasing beta [0.12.0b1] after additional testing. Please note the breaking changes made from 0.11. You will receive deprecation warnings when calling things that have been restructured, and they will eventually be removed.

Added

  • Adds enhanced plural method with more comprehensive English pluralization rules compared to the previous approach, including special case handling for words ending in 'y', 's', 'x', 'z', 'ch', 'sh', 'o', 'f', and 'fe', as well as support for negative numbers.

Full Changelog: v0.11.4...v0.12.0