Skip to content

Commit

Permalink
Place Protocol import in else block
Browse files Browse the repository at this point in the history
  • Loading branch information
tekktrik committed Mar 29, 2022
1 parent 08e31ca commit cf17c20
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions adafruit_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ def cast(_t, value):
from types import ModuleType, TracebackType
from typing import Any, Dict, List, Optional, Tuple, Type, Union, cast

try:
from typing import Protocol
except ImportError:
from typing_extensions import Protocol
try:
from typing import Protocol
except ImportError:
from typing_extensions import Protocol

# Based on https://github.com/python/typeshed/blob/master/stdlib/_socket.pyi
class CommonSocketType(Protocol):
Expand Down

0 comments on commit cf17c20

Please sign in to comment.