I searched through existing issues, and saw the # type: ignore method, but doesn't seem to work:
from flask import Flask # type: ignore
app = Flask(__name__)
log = config.configure_logging(app)
log.info('Starting Flask Demo with environment {0}'.format(config.ENVIRONMENT))
app.config.from_object(config)
app.config.from_envvar('APP_SETTINGS', silent=True)
app.config.from_object(config)
app.config.from_envvar('APP_SETTINGS', silent=True)
api/app.py:22: error: "Dict[str, Any]" has no attribute "from_object"
api/app.py:23: error: "Dict[str, Any]" has no attribute "from_envvar"
MyPy Version: 0.670
# type: ignore should be put on the line where error appears.thanks that worked,
btw: this was the referenced thread, and # type ignore is on the import
Note its# type: ignore (with the colon) as described in PEP-484
Most helpful comment
# type: ignoreshould be put on the line where error appears.