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

typing check started to fail: error: No overload variant of "PrivateAttr" matches argument type "None" #1537

Closed
yarikoptic opened this issue Nov 25, 2024 · 1 comment · Fixed by #1538
Labels

Comments

@yarikoptic
Copy link
Member

originally triggered in

❯ tox -e typing
.pkg: _optional_hooks> python /usr/lib/python3/dist-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg: get_requires_for_build_sdist> python /usr/lib/python3/dist-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg: get_requires_for_build_wheel> python /usr/lib/python3/dist-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg: prepare_metadata_for_build_wheel> python /usr/lib/python3/dist-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg: build_sdist> python /usr/lib/python3/dist-packages/pyproject_api/_backend.py True setuptools.build_meta
typing: install_package> python -I -m pip install --force-reinstall --no-deps /home/yoh/proj/dandi/dandi-cli-master/.tox/.tmp/package/22/dandi-0.64.0+10.g3940aa26.tar.gz
typing: commands[0]> mypy dandi
dandi/dandiapi.py:1381: error: No overload variant of "PrivateAttr" matches argument type "None"  [call-overload]
        _metadata: Optional[Dict[str, Any]] = PrivateAttr(default_factory=None)
                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dandi/dandiapi.py:1381: note: Possible overload variants:
dandi/dandiapi.py:1381: note:     def [_T] PrivateAttr(default: _T, *, init: Literal[False] = ...) -> _T
dandi/dandiapi.py:1381: note:     def [_T] PrivateAttr(*, default_factory: Callable[[], _T], init: Literal[False] = ...) -> _T
dandi/dandiapi.py:1381: note:     def PrivateAttr(*, init: Literal[False] = ...) -> Any
Found 1 error in 1 file (checked 81 source files)
typing: exit 1 (2.81 seconds) /home/yoh/proj/dandi/dandi-cli-master> mypy dandi pid=451944
  typing: FAIL code 1 (6.82=setup[4.01]+cmd[2.81] seconds)
  evaluation failed :( (6.91 seconds)
tox -e typing  5.66s user 0.72s system 90% cpu 7.080 total

@candleindark @jwodder do you see immediate resolution?

yarikoptic added a commit that referenced this issue Nov 25, 2024
Copy link

🚀 Issue was released in 0.65.0 🚀

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

Successfully merging a pull request may close this issue.

1 participant