Skip to content

Commit

Permalink
backport to python 3.9
Browse files Browse the repository at this point in the history
  • Loading branch information
zackees committed Jun 23, 2023
1 parent e8fc2ca commit a2f57df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/disklru/disklru.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import os
import sqlite3
from datetime import datetime
from typing import Any
from typing import Any, Optional

# pylint: disable=line-too-long

Expand Down Expand Up @@ -36,7 +36,7 @@ def __init__(self, db_path: str, max_size: str) -> None:
self.conn.commit()
self.max_size = max_size

def get(self, key: str) -> str | None:
def get(self, key: str) -> Optional[str]:
"""Returns the value associated with the given key, or None if the key is not in the cache."""
assert not self.closed
self.cursor.execute("SELECT value FROM cache WHERE key=?", (key,))
Expand Down

0 comments on commit a2f57df

Please sign in to comment.