Skip to content

Commit

Permalink
check py version
Browse files Browse the repository at this point in the history
  • Loading branch information
molbap committed Jun 25, 2024
1 parent 3bf804f commit 2c8180a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/transformers/models/donut/processing_donut.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@
Processor class for Donut.
"""

import sys
from typing import List, Optional, Union


try:
if sys.version_info >= (3, 11):
from typing import Unpack
except ImportError:
else:
from typing_extensions import Unpack

import re
Expand Down
6 changes: 4 additions & 2 deletions src/transformers/models/wav2vec2/processing_wav2vec2.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,15 @@
Speech processor class for Wav2Vec2
"""

import sys
from typing import List, Optional, Union


try:
if sys.version_info >= (3, 11):
from typing import Unpack
except ImportError:
else:
from typing_extensions import Unpack

import warnings
from contextlib import contextmanager

Expand Down

0 comments on commit 2c8180a

Please sign in to comment.