OpenBagTwo / gsb

A tool for managing incremental backups of your save states using Git!
https://openbagtwo.github.io/gsb/
GNU General Public License v3.0
0 stars 0 forks source link

Add py.typed to the gsb package #39

Closed OpenBagTwo closed 1 year ago

OpenBagTwo commented 1 year ago

Summary

Implements #35

List of Changes

Tech Debt and Other Concerns

Validation Performed

  1. Created a clean virtual environment and installed gsb (version 0.0.2) via pip along with mypy.
  2. Created the following python file, which has numerous type issues:
    from gsb import history
    x: tuple[str] = history.get_history(".", since="today")
  3. Ran mypy on the python file and got back the following response:
    hint_test.py:1: error: Skipping analyzing "gsb": module is installed, but missing library stubs or py.typed marker  [import]
    hint_test.py:1: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
    Found 1 error in 1 file (checked 1 source file)
  4. Navigated to my project repo and ran pip install -e . (gsb -V now replies with "gsb, version 0.0.2+24.g4a1a6a6")
  5. Ran mypy again. Got the response:
    hint_test.py:2: error: Incompatible types in assignment (expression has type "list[_Revision]", variable has type "tuple[str]")  [assignment]
    hint_test.py:2: error: Argument 1 to "get_history" has incompatible type "str"; expected "Path"  [arg-type]
    hint_test.py:2: error: Argument "since" to "get_history" has incompatible type "str"; expected "date"  [arg-type]
    Found 3 errors in 1 file (checked 1 source file)

PR Type

Checklist: