Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix mypy checking #472

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from

Commits on Nov 21, 2022

  1. mypy: setup for static analysis

    mypy is a static analyzer for Python using the Python3 typehints as meta
    data. See the below link for more information:
      - https://mypy.readthedocs.io/en/stable/index.html
    
    Signed-off-by: William Roberts <william.c.roberts@intel.com>
    William Roberts committed Nov 21, 2022
    Configuration menu
    Copy the full SHA
    c2c78d1 View commit details
    Browse the repository at this point in the history
  2. ci: add a mypy checker

    Signed-off-by: William Roberts <william.c.roberts@intel.com>
    William Roberts committed Nov 21, 2022
    Configuration menu
    Copy the full SHA
    38d9535 View commit details
    Browse the repository at this point in the history
  3. test_fapi.py: fix mypy errors

    Fixes:
    test/test_fapi.py:84: error: Incompatible types in assignment (expression has type "bytes", variable has type "Hash")
    test/test_fapi.py:85: error: Incompatible return value type (got "Hash", expected "bytes")
    
    Signed-off-by: William Roberts <william.c.roberts@intel.com>
    William Roberts committed Nov 21, 2022
    Configuration menu
    Copy the full SHA
    ebcd827 View commit details
    Browse the repository at this point in the history
  4. mypy: drop option --ignore-missing-imports

    Drop the nuclear option of --ignore-missing-imports and add a more
    targeted approach to ignoring libraries without type information. This
    just makes sure that tpm2-pytss internal modules themselves don't
    accidentally get ignored.
    
    Signed-off-by: William Roberts <william.c.roberts@intel.com>
    William Roberts committed Nov 21, 2022
    Configuration menu
    Copy the full SHA
    dc1efc2 View commit details
    Browse the repository at this point in the history
  5. tpm2_pytss.internal: add py.typed

    Signed-off-by: William Roberts <william.c.roberts@intel.com>
    William Roberts committed Nov 21, 2022
    Configuration menu
    Copy the full SHA
    75b7679 View commit details
    Browse the repository at this point in the history
  6. mypy: get checker working better

    Signed-off-by: William Roberts <william.c.roberts@intel.com>
    William Roberts committed Nov 21, 2022
    Configuration menu
    Copy the full SHA
    6e58567 View commit details
    Browse the repository at this point in the history
  7. mypy: WIP

    Signed-off-by: William Roberts <william.c.roberts@intel.com>
    William Roberts committed Nov 21, 2022
    Configuration menu
    Copy the full SHA
    336aa16 View commit details
    Browse the repository at this point in the history