getmac icon indicating copy to clipboard operation
getmac copied to clipboard

Type hint using stub file instead of inline comments

Open GhostofGoes opened this issue 6 years ago • 0 comments

Move to using a *.pyi stub file for type hints instead of the current inline comments. There are a number of reasons I'd like to do this:

  • Ability to use complex types without adding more imports, as well as recent language features like forward references and TypedDict on a codebase that presently still supports 2.7
  • Readability: type comments don't look great and clutter the already ugly (in my opinion) code base
  • Performance: avoid attempting to import the typing module

GhostofGoes avatar Dec 05 '19 02:12 GhostofGoes