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

Conversation

williamcroberts
Copy link
Member

No description provided.

William Roberts added 3 commits November 21, 2022 15:24
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>
Signed-off-by: William Roberts <william.c.roberts@intel.com>
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>
@williamcroberts williamcroberts linked an issue Nov 21, 2022 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Nov 21, 2022

Codecov Report

Merging #472 (336aa16) into master (8014ee9) will decrease coverage by 0.00%.
The diff coverage is 96.00%.

@@            Coverage Diff             @@
##           master     #472      +/-   ##
==========================================
- Coverage   88.17%   88.16%   -0.01%     
==========================================
  Files          18       18              
  Lines        6630     6627       -3     
  Branches      972      972              
==========================================
- Hits         5846     5843       -3     
  Misses        639      639              
  Partials      145      145              
Impacted Files Coverage Δ
src/tpm2_pytss/policy.py 0.56% <0.00%> (ø)
src/tpm2_pytss/internal/crypto.py 91.94% <93.75%> (-0.04%) ⬇️
src/tpm2_pytss/TCTI.py 69.73% <100.00%> (ø)
src/tpm2_pytss/TCTILdr.py 89.58% <100.00%> (ø)
src/tpm2_pytss/TSS2_Exception.py 97.61% <100.00%> (ø)
src/tpm2_pytss/callbacks.py 86.66% <100.00%> (ø)
src/tpm2_pytss/constants.py 98.10% <100.00%> (+<0.01%) ⬆️
src/tpm2_pytss/encoding.py 92.42% <100.00%> (ø)
src/tpm2_pytss/internal/utils.py 79.45% <100.00%> (ø)
src/tpm2_pytss/tsskey.py 98.34% <100.00%> (ø)
... and 1 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

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>
@williamcroberts williamcroberts marked this pull request as draft November 21, 2022 21:48
William Roberts added 2 commits November 21, 2022 15:56
Signed-off-by: William Roberts <william.c.roberts@intel.com>
Signed-off-by: William Roberts <william.c.roberts@intel.com>
@lgtm-com
Copy link

lgtm-com bot commented Nov 21, 2022

This pull request introduces 2 alerts when merging ba081d5 into 8014ee9 - view on LGTM.com

new alerts:

  • 1 for Unused local variable
  • 1 for Unused import

Heads-up: LGTM.com's PR analysis will be disabled on the 5th of December, and LGTM.com will be shut down ⏻ completely on the 16th of December 2022. It looks like GitHub code scanning with CodeQL is already set up for this repo, so no further action is needed 🚀. For more information, please check out our post on the GitHub blog.

Signed-off-by: William Roberts <william.c.roberts@intel.com>
@williamcroberts williamcroberts added the hold hold this patch after release label Jan 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hold hold this patch after release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tox complains about missing library stubs or py.typed.marker
1 participant