Open
Description
I have the following:
@attr.s(auto_attribs=True)
class Foo:
bars: List[Bar] = attr.ib(
default=attr.Factory(list),
converter=default_if_none(default=attr.Factory(list)),
)
I'm running mypy via pre-commit
and getting:
error: Unsupported converter, only named functions and types are currently supported
I have the following in my .pre-commit-config.yaml
:
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.650
hooks:
- id: mypy
additional_dependencies:
- attrs>=18.2.0
(Without the additional_dependencies
part I also get error: Module 'attr.converters' has no attribute 'default_if_none'
)
Could the issue be that there's special handling for optional
here but not for default_if_none
?