get_attribute_hook
for unknown attributes
#5910
Labels
bug
mypy got something wrong
priority-1-normal
topic-plugins
The plugin API and ideas for new plugins
How do I intercept type inference of the
settings.ROOT_DIR
here?I wasn't able to get it working neither with
get_attribute_hook
, nor with others.settings
is specified asFrom the implementation, it looks like hooks's only called if attribute is present on the object (is a Var)
https://github.com/python/mypy/blob/master/mypy/checkmember.py#L280
Another solution for this problem could be to augment the AST with an additional settings dynamically somewhere in the plugin, but for that I need an initialization hook.
The text was updated successfully, but these errors were encountered: