Skip to content

Commit

Permalink
Simplify type annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
TomHodson committed Oct 3, 2024
1 parent b00f7e8 commit 1e0f479
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions pyfdb/pyfdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
# limitations under the License.
import io
import os
from typing import Iterator

import cffi
import findlibs
Expand Down Expand Up @@ -187,7 +186,7 @@ def __init__(self, fdb, request, duplicates, key=False, expand=True):
self.off = ffi.new("size_t*")
self.len = ffi.new("size_t*")

def __next__(self):
def __next__(self) -> dict:
err = lib.fdb_listiterator_next(self.__iterator)

if err != 0:
Expand Down Expand Up @@ -300,7 +299,7 @@ def archive(self, data, request=None):
def flush(self):
lib.fdb_flush(self.ctype)

def list(self, request=None, duplicates=False, keys=False) -> Iterator[dict]:
def list(self, request=None, duplicates=False, keys=False):
return ListIterator(self, request, duplicates, keys)

def retrieve(self, request) -> DataRetriever:
Expand All @@ -321,7 +320,7 @@ def archive(data):
fdb.archive(data)


def list(request, duplicates=False, keys=False) -> Iterator[dict]:
def list(request, duplicates=False, keys=False):
global fdb
if not fdb:
fdb = FDB()
Expand Down

0 comments on commit 1e0f479

Please sign in to comment.