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

Using mypy with Python >= 3.9 reports errors #1168

Open
haakonvt opened this issue Mar 14, 2023 · 0 comments
Open

Using mypy with Python >= 3.9 reports errors #1168

haakonvt opened this issue Mar 14, 2023 · 0 comments
Labels

Comments

@haakonvt
Copy link
Contributor

cognite/client/utils/_concurrency.py:229: error: Incompatible types in
assignment (expression has type "ThreadPoolExecutor", variable has type
"TaskExecutor")  [assignment]
                executor: TaskExecutor = _THREAD_POOL_EXECUTOR_SINGLETON
                                         ^
cognite/client/utils/_concurrency.py:229: note: Following member(s) of "ThreadPoolExecutor" have conflicts:
cognite/client/utils/_concurrency.py:229: note:     Expected:
cognite/client/utils/_concurrency.py:229: note:         def [T_Result] submit(self, fn: Callable[..., T_Result], *args: Any, **kwargs: Any) -> TaskFuture[T_Result]
cognite/client/utils/_concurrency.py:229: note:     Got:
cognite/client/utils/_concurrency.py:229: note:         def [_P`-1, _T] submit(self, Callable[_P, _T], *args: _P.args, **kwargs: _P.kwargs) -> Future[_T]
cognite/client/utils/_concurrency.py:232: error: Incompatible types in
assignment (expression has type "ThreadPoolExecutor", variable has type
"TaskExecutor")  [assignment]
                executor = _THREAD_POOL_EXECUTOR_SINGLETON = ThreadPoolExe...
                ^
cognite/client/utils/_concurrency.py:232: note: Following member(s) of "ThreadPoolExecutor" have conflicts:
cognite/client/utils/_concurrency.py:232: note:     Expected:
cognite/client/utils/_concurrency.py:232: note:         def [T_Result] submit(self, fn: Callable[..., T_Result], *args: Any, **kwargs: Any) -> TaskFuture[T_Result]
cognite/client/utils/_concurrency.py:232: note:     Got:
cognite/client/utils/_concurrency.py:232: note:         def [_P`-1, _T] submit(self, Callable[_P, _T], *args: _P.args, **kwargs: _P.kwargs) -> Future[_T]
Found 2 errors in 1 file (checked 80 source files)

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant