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

Update mypy pre-commit hook #596

Closed
seifertm opened this issue Aug 11, 2023 · 0 comments · Fixed by #769
Closed

Update mypy pre-commit hook #596

seifertm opened this issue Aug 11, 2023 · 0 comments · Fixed by #769

Comments

@seifertm
Copy link
Contributor

When bumping the version of the pre-commit hooks with pre-commit autoupdate, mypy reports typing errors.

The goal of this issue is to update the mypy pre-commit hook (and ideally all others) to the most recent version. At the same time, any new typing error should be addressed.

@seifertm seifertm changed the title Update pre-commit hooks Update mypy pre-commit hook Aug 11, 2023
efiop added a commit to efiop/adlfs that referenced this issue Dec 22, 2023
With newer versions we get a lot of errors like:

```
____________________________ test_isfile_versioned _____________________________

self = <Coroutine test_isfile_versioned>

    def runtest(self) -> None:
        self.obj = wrap_in_sync(
            # pytest-dev/pytest-asyncio#596
            self.obj,  # type: ignore[has-type]
        )
>       super().runtest()

/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pytest_asyncio/plugin.py:431:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pytest_asyncio/plugin.py:879: in inner
    _loop.run_until_complete(task)
/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/asyncio/base_events.py:592: in run_until_complete
    self._check_running()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <_UnixSelectorEventLoop running=True closed=False debug=False>

    def _check_running(self):
        if self.is_running():
>           raise RuntimeError('This event loop is already running')
E           RuntimeError: This event loop is already running

/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/asyncio/base_events.py:552: RuntimeError
```

Don't know precise reason and maybe using nest-asyncio package would fix that, but for now
just pinning older version to move forward.
efiop added a commit to fsspec/adlfs that referenced this issue Dec 22, 2023
With newer versions we get a lot of errors like:

```
____________________________ test_isfile_versioned _____________________________

self = <Coroutine test_isfile_versioned>

    def runtest(self) -> None:
        self.obj = wrap_in_sync(
            # pytest-dev/pytest-asyncio#596
            self.obj,  # type: ignore[has-type]
        )
>       super().runtest()

/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pytest_asyncio/plugin.py:431:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pytest_asyncio/plugin.py:879: in inner
    _loop.run_until_complete(task)
/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/asyncio/base_events.py:592: in run_until_complete
    self._check_running()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <_UnixSelectorEventLoop running=True closed=False debug=False>

    def _check_running(self):
        if self.is_running():
>           raise RuntimeError('This event loop is already running')
E           RuntimeError: This event loop is already running

/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/asyncio/base_events.py:552: RuntimeError
```

Don't know precise reason and maybe using nest-asyncio package would fix that, but for now
just pinning older version to move forward.
@seifertm seifertm linked a pull request Feb 6, 2024 that will close this issue
@seifertm seifertm added this to the v0.23 milestone Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant