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

Enable test of types in CI #7151

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Enable test of types in CI #7151

wants to merge 4 commits into from

Conversation

hoxbro
Copy link
Member

@hoxbro hoxbro commented Aug 15, 2024

Currently, we just ran mypy, this will make it so it fails if type testing fails. I have, set it up so you manually have to enable modules.

Copied settings from: https://github.com/bokeh/bokeh/blob/bba83ab0db6986f5b8e82ab01e2ad2d09b877cea/pyproject.toml

Commented out strict for now, as it have many failing tests. Currently, I see two failing tests.

Currently two errors, the changes in the codebase is to fix other errors.

panel/io/cache.py: note: In function "cache":
panel/io/cache.py:472:23: error: Incompatible types in "await" (actual type "_R", expected type "Awaitable[Any]")  [misc]
                    ret = await func(*args, **kwargs)
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~
panel/io/cache.py:515:12: error: Incompatible return value type (got "_Wrapped[_P, _R, _P, Coroutine[Any, Any, _R]]", expected "_CachedFunc[Callable[_P, _R]] | Callable[[Callable[_P, _R]], _CachedFunc[Callable[_P, _R]]]")  [return-value]
        return wrapped_func
               ^~~~~~~~~~~~
Found 2 errors in 1 file (checked 341 source files)

Copy link

codecov bot commented Aug 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.24%. Comparing base (e7c8ced) to head (d22b96e).

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #7151       +/-   ##
===========================================
+ Coverage   41.17%   82.24%   +41.06%     
===========================================
  Files         315      327       +12     
  Lines       46759    48972     +2213     
===========================================
+ Hits        19255    40277    +21022     
+ Misses      27504     8695    -18809     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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