import foo as bar # type: ignore
If the warning really is false, add this comment after the line and the linter will ignore it and not raise a warning.