From fec42492c81f86a2b93d04ebb6651ac43a3bdee8 Mon Sep 17 00:00:00 2001 From: Scott Gasch Date: Thu, 8 Jun 2023 11:40:53 -0700 Subject: [PATCH] Type -> type --- src/pyutils/persistent.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pyutils/persistent.py b/src/pyutils/persistent.py index c31404d..75d764a 100644 --- a/src/pyutils/persistent.py +++ b/src/pyutils/persistent.py @@ -36,7 +36,7 @@ import functools import logging import re from abc import ABC, abstractmethod -from typing import Any, Optional, Type +from typing import Any, Optional from overrides import overrides @@ -62,7 +62,7 @@ class Persistent(ABC): @classmethod @abstractmethod - def load(cls: Type[Persistent]) -> Optional[Persistent]: + def load(cls: type[Persistent]) -> Optional[Persistent]: """Load this thing from somewhere and give back an instance which will become the global singleton and which may (see below) be saved (via :meth:`save`) at program exit time. @@ -182,7 +182,7 @@ class PicklingFileBasedPersistent(FileBasedPersistent): @classmethod @overrides def load( - cls: Type[PicklingFileBasedPersistent], + cls: type[PicklingFileBasedPersistent], ) -> Optional[PicklingFileBasedPersistent]: filename = cls.get_filename() if cls.should_we_load_data(filename): @@ -265,7 +265,7 @@ class JsonFileBasedPersistent(FileBasedPersistent): @classmethod @overrides - def load(cls: Type[JsonFileBasedPersistent]) -> Optional[JsonFileBasedPersistent]: + def load(cls: type[JsonFileBasedPersistent]) -> Optional[JsonFileBasedPersistent]: filename = cls.get_filename() if cls.should_we_load_data(filename): logger.debug("Trying to load state from %s", filename) -- 2.46.0