Skip to content

Commit

Permalink
fix:import Self from typing vs. typing_extension
Browse files Browse the repository at this point in the history
  • Loading branch information
cunla committed Apr 21, 2024
1 parent 05f9a41 commit f67cfa8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
7 changes: 4 additions & 3 deletions fakeredis/_server.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import inspect
import logging
import queue
import sys
import threading
import time
import uuid
Expand All @@ -9,10 +10,10 @@
from collections import defaultdict
from typing import Dict, Tuple, Any, List, Optional, Union, Set

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

import redis

Expand Down
2 changes: 1 addition & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ include = [
python = "^3.7"
redis = ">=4"
sortedcontainers = "^2"
typing_extensions = { version = "^4.7", python = "<3.11" }
lupa = { version = ">=1.14,<3.0", optional = true }
jsonpath-ng = { version = "^1.6", optional = true }
pyprobables = { version = "^0.6", optional = true }
Expand Down

0 comments on commit f67cfa8

Please sign in to comment.