Skip to content

Commit

Permalink
Do not use exceptions for conditional imports
Browse files Browse the repository at this point in the history
This additionally helps make mypy happy.
  • Loading branch information
hashhar committed Feb 3, 2024
1 parent 191cd79 commit a54c441
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions trino/mapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@

import abc
import base64
import sys
import uuid
from datetime import date, datetime, time, timedelta, timezone, tzinfo
from decimal import Decimal
from typing import Any, Dict, Generic, List, Optional, Tuple, TypeVar

try:
if sys.version_info >= (3, 9):
from zoneinfo import ZoneInfo
except ModuleNotFoundError:
else:
from backports.zoneinfo import ZoneInfo

import trino.exceptions
Expand Down

0 comments on commit a54c441

Please sign in to comment.