Skip to content

Code Modernization and Type Hinting#32

Open
bmos wants to merge 13 commits into
fitnr:masterfrom
bmos:type_hints
Open

Code Modernization and Type Hinting#32
bmos wants to merge 13 commits into
fitnr:masterfrom
bmos:type_hints

Conversation

@bmos
Copy link
Copy Markdown
Contributor

@bmos bmos commented Feb 17, 2026

General modernization, since the package was originally built to be compatible with python 2.

The major benefit here is the type hinting, especially in reference to the string literals.
With this sort of type hinting in place, most IDEs will highlight code issues before the user even runs it. It's a big improvement to ease of use.

A couple of the other improvements that are worth noting:

  • All caught Exceptions are limited to specific exceptions
  • Most (all?) keyword arguments are now listed explicitly so that IDEs can make them known to users
  • All captured and modified exceptions now raise from, which makes error messages more helpful
  • addressbatch no longer closes file-like (already open) objects, only files that it opens
  • addressbatch now accepts Path objects too, not just str paths

@bmos bmos changed the title Add Full Type Hinting Code Modernization / Type Hinting Feb 17, 2026
@bmos bmos force-pushed the type_hints branch 3 times, most recently from b6d72f0 to f319fe4 Compare February 28, 2026 15:02
@bmos bmos changed the title Code Modernization / Type Hinting Code Modernization and Type Hinting Feb 28, 2026
@bmos bmos changed the title Code Modernization and Type Hinting Code + CI Modernization and Type Hinting Mar 1, 2026
@bmos bmos force-pushed the type_hints branch 6 times, most recently from 3c639b2 to a541123 Compare March 13, 2026 13:32
@bmos bmos changed the title Code + CI Modernization and Type Hinting Code Modernization and Type Hinting Mar 13, 2026
@bmos bmos marked this pull request as draft March 13, 2026 14:15
@bmos bmos marked this pull request as ready for review March 14, 2026 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant