Skip to content

Commit

Permalink
Use version check rather than try/except.
Browse files Browse the repository at this point in the history
  • Loading branch information
liffiton committed Jul 26, 2024
1 parent 8807f1c commit 896b5db
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/gened/migrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@
# SPDX-License-Identifier: AGPL-3.0-only

import itertools
import sys
from collections.abc import Iterable
from datetime import datetime
from importlib import resources
from pathlib import Path
from typing import TypedDict

try:
from importlib.resources.abc import Traversable # 3.12+
except ImportError:
if sys.version_info >= (3, 11):
from importlib.resources.abc import Traversable
else:
from importlib.abc import Traversable # - Deprecated in 3.12, removed in 3.14

import click
Expand Down

0 comments on commit 896b5db

Please sign in to comment.