[mypy] Enforcing typing for db_engine_specs (#9138)

This commit is contained in:
John Bodley
2020-02-17 23:08:11 -08:00
committed by GitHub
parent 3149d8ebc0
commit 9f5f8e5d92
17 changed files with 173 additions and 104 deletions

View File

@@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.
from datetime import datetime
from typing import List, Optional, Tuple, TYPE_CHECKING
from typing import Any, List, Optional, Tuple, TYPE_CHECKING
from pytz import _FixedOffset # type: ignore
from sqlalchemy.dialects.postgresql.base import PGInspector
@@ -51,7 +51,7 @@ class PostgresBaseEngineSpec(BaseEngineSpec):
}
@classmethod
def fetch_data(cls, cursor, limit: int) -> List[Tuple]:
def fetch_data(cls, cursor: Any, limit: int) -> List[Tuple]:
cursor.tzinfo_factory = FixedOffsetTimezone
if not cursor.description:
return []