From 8df0172a50a782bdafc1090e7b3438da087c664f Mon Sep 17 00:00:00 2001 From: Andrew Rosen Date: Thu, 27 Jul 2023 12:41:46 -0700 Subject: [PATCH] cleanup --- setup.py | 4 ++++ src/maggma/api/resource/__init__.py | 2 +- src/maggma/api/resource/aggregation.py | 4 ++-- src/maggma/api/resource/core.py | 2 +- src/maggma/api/resource/read_resource.py | 8 +++----- src/maggma/api/resource/s3_url.py | 12 +++++------- src/maggma/api/utils.py | 4 ++-- src/maggma/cli/__init__.py | 7 +++---- src/maggma/cli/distributed.py | 13 ++++++------- src/maggma/cli/multiprocessing.py | 7 +------ src/maggma/cli/rabbitmq.py | 10 +++++----- src/maggma/stores/aws.py | 2 +- src/maggma/stores/azure.py | 10 +++++----- src/maggma/stores/file_store.py | 19 ++++++++----------- src/maggma/stores/gridfs.py | 4 ++-- src/maggma/stores/mongolike.py | 13 +++++++------ src/maggma/stores/shared_stores.py | 10 ++++++---- src/maggma/utils.py | 2 +- tests/api/test_aggregation_resource.py | 4 +--- tests/api/test_api.py | 6 +++--- tests/api/test_post_resource.py | 4 +--- tests/api/test_query_operators.py | 19 +++++++++---------- tests/api/test_read_resource.py | 6 ++---- tests/api/test_s3_url_resource.py | 3 ++- tests/api/test_submission_resource.py | 9 ++++----- tests/api/test_utils.py | 5 ++--- tests/cli/test_distributed.py | 7 +++---- tests/stores/test_azure.py | 5 +++-- tests/stores/test_file_store.py | 3 ++- tests/stores/test_gridfs.py | 9 ++++----- tests/stores/test_mongolike.py | 6 +++--- tests/stores/test_shared_stores.py | 4 ++-- tests/test_utils.py | 3 +-- 33 files changed, 105 insertions(+), 121 deletions(-) diff --git a/setup.py b/setup.py index d86d7ab3b..a488b84ac 100644 --- a/setup.py +++ b/setup.py @@ -57,6 +57,10 @@ classifiers=[ "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Science/Research", "Intended Audience :: System Administrators", diff --git a/src/maggma/api/resource/__init__.py b/src/maggma/api/resource/__init__.py index e8c21eb25..3726acd89 100644 --- a/src/maggma/api/resource/__init__.py +++ b/src/maggma/api/resource/__init__.py @@ -8,8 +8,8 @@ from maggma.api.resource.aggregation import AggregationResource from maggma.api.resource.post_resource import PostOnlyResource from maggma.api.resource.read_resource import ReadOnlyResource, attach_query_ops -from maggma.api.resource.submission import SubmissionResource from maggma.api.resource.s3_url import S3URLResource +from maggma.api.resource.submission import SubmissionResource __all__ = [ "Resource", diff --git a/src/maggma/api/resource/aggregation.py b/src/maggma/api/resource/aggregation.py index 2a65e447c..8b5e7a076 100644 --- a/src/maggma/api/resource/aggregation.py +++ b/src/maggma/api/resource/aggregation.py @@ -1,6 +1,6 @@ from typing import Any, Dict, List, Optional, Type -from fastapi import HTTPException, Response, Request +from fastapi import HTTPException, Request, Response from pydantic import BaseModel from pymongo import timeout as query_timeout from pymongo.errors import NetworkTimeout, PyMongoError @@ -8,7 +8,7 @@ from maggma.api.models import Meta from maggma.api.models import Response as ResponseModel from maggma.api.query_operator import QueryOperator -from maggma.api.resource import Resource, HeaderProcessor +from maggma.api.resource import HeaderProcessor, Resource from maggma.api.resource.utils import attach_query_ops from maggma.api.utils import STORE_PARAMS, merge_queries from maggma.core import Store diff --git a/src/maggma/api/resource/core.py b/src/maggma/api/resource/core.py index 105eef1f1..00de1c0a2 100644 --- a/src/maggma/api/resource/core.py +++ b/src/maggma/api/resource/core.py @@ -2,7 +2,7 @@ from abc import ABCMeta, abstractmethod from typing import Dict, Type -from fastapi import APIRouter, FastAPI, Response, Request +from fastapi import APIRouter, FastAPI, Request, Response from monty.json import MontyDecoder, MSONable from pydantic import BaseModel from starlette.responses import RedirectResponse diff --git a/src/maggma/api/resource/read_resource.py b/src/maggma/api/resource/read_resource.py index d7eccb069..eb5fb522e 100644 --- a/src/maggma/api/resource/read_resource.py +++ b/src/maggma/api/resource/read_resource.py @@ -1,8 +1,8 @@ from inspect import signature from typing import Any, Dict, List, Optional, Type, Union -from fastapi import Depends, HTTPException, Path, Request -from fastapi import Response +import orjson +from fastapi import Depends, HTTPException, Path, Request, Response from pydantic import BaseModel from pymongo import timeout as query_timeout from pymongo.errors import NetworkTimeout, PyMongoError @@ -10,14 +10,12 @@ from maggma.api.models import Meta from maggma.api.models import Response as ResponseModel from maggma.api.query_operator import PaginationQuery, QueryOperator, SparseFieldsQuery -from maggma.api.resource import Resource, HintScheme, HeaderProcessor +from maggma.api.resource import HeaderProcessor, HintScheme, Resource from maggma.api.resource.utils import attach_query_ops, generate_query_pipeline from maggma.api.utils import STORE_PARAMS, merge_queries, serialization_helper from maggma.core import Store from maggma.stores import MongoStore, S3Store -import orjson - class ReadOnlyResource(Resource): """ diff --git a/src/maggma/api/resource/s3_url.py b/src/maggma/api/resource/s3_url.py index 252b9f7fc..c3b838df4 100644 --- a/src/maggma/api/resource/s3_url.py +++ b/src/maggma/api/resource/s3_url.py @@ -1,18 +1,16 @@ from datetime import datetime, timedelta from typing import List, Optional -from botocore.exceptions import ClientError -from fastapi import HTTPException, Path, Request -from fastapi import Response +import orjson +from botocore.exceptions import ClientError +from fastapi import HTTPException, Path, Request, Response -from maggma.api.models import S3URLDoc from maggma.api.models import Response as ResponseModel -from maggma.api.resource import Resource, HeaderProcessor +from maggma.api.models import S3URLDoc +from maggma.api.resource import HeaderProcessor, Resource from maggma.api.utils import serialization_helper from maggma.stores.aws import S3Store -import orjson - class S3URLResource(Resource): """ diff --git a/src/maggma/api/utils.py b/src/maggma/api/utils.py index 525758b0a..e48c98a1e 100644 --- a/src/maggma/api/utils.py +++ b/src/maggma/api/utils.py @@ -1,9 +1,9 @@ +import base64 import inspect import sys from typing import Any, Callable, Dict, List, Optional, Type -from bson.objectid import ObjectId -import base64 +from bson.objectid import ObjectId from monty.json import MSONable from pydantic import BaseModel from pydantic.schema import get_flat_models_from_model diff --git a/src/maggma/cli/__init__.py b/src/maggma/cli/__init__.py index 13dc7d9ed..12d7504e6 100644 --- a/src/maggma/cli/__init__.py +++ b/src/maggma/cli/__init__.py @@ -5,8 +5,8 @@ import asyncio import logging import sys -from itertools import chain from datetime import datetime +from itertools import chain import click from monty.serialization import loadfn @@ -14,11 +14,10 @@ from maggma.cli.distributed import find_port from maggma.cli.multiprocessing import multi from maggma.cli.serial import serial -from maggma.cli.source_loader import ScriptFinder, load_builder_from_source from maggma.cli.settings import CLISettings +from maggma.cli.source_loader import ScriptFinder, load_builder_from_source from maggma.utils import ReportingHandler, TqdmLoggingHandler - sys.meta_path.append(ScriptFinder()) settings = CLISettings() @@ -130,7 +129,7 @@ def run( ): # Import profiler and setup directories to dump profiler output if memray: - from memray import Tracker, FileDestination + from memray import FileDestination, Tracker if memray_dir: import os diff --git a/src/maggma/cli/distributed.py b/src/maggma/cli/distributed.py index f74638ac2..20408de8f 100644 --- a/src/maggma/cli/distributed.py +++ b/src/maggma/cli/distributed.py @@ -1,15 +1,16 @@ #!/usr/bin/env python # coding utf-8 +import asyncio import json -from logging import getLogger import socket as pysocket -from typing import List -import numpy as np -from time import perf_counter -import asyncio +from logging import getLogger from random import randint +from time import perf_counter +from typing import List +import numpy as np +import zmq from monty.json import jsanitize from monty.serialization import MontyDecoder @@ -18,8 +19,6 @@ from maggma.core import Builder from maggma.utils import tqdm -import zmq - settings = CLISettings() diff --git a/src/maggma/cli/multiprocessing.py b/src/maggma/cli/multiprocessing.py index 5c9228ae1..192f6f377 100644 --- a/src/maggma/cli/multiprocessing.py +++ b/src/maggma/cli/multiprocessing.py @@ -1,12 +1,7 @@ #!/usr/bin/env python # coding utf-8 -from asyncio import ( - BoundedSemaphore, - Queue, - gather, - get_event_loop, -) +from asyncio import BoundedSemaphore, Queue, gather, get_event_loop from concurrent.futures import ProcessPoolExecutor from logging import getLogger from types import GeneratorType diff --git a/src/maggma/cli/rabbitmq.py b/src/maggma/cli/rabbitmq.py index 27333de86..62be5935a 100644 --- a/src/maggma/cli/rabbitmq.py +++ b/src/maggma/cli/rabbitmq.py @@ -3,20 +3,20 @@ import asyncio import json -from logging import getLogger import socket as pysocket -from typing import List, Literal -import numpy as np -from time import perf_counter +from logging import getLogger from random import randint +from time import perf_counter +from typing import List, Literal +import numpy as np from monty.json import jsanitize from monty.serialization import MontyDecoder from maggma.cli.multiprocessing import multi from maggma.cli.settings import CLISettings from maggma.core import Builder -from maggma.utils import tqdm, Timeout +from maggma.utils import Timeout, tqdm try: import pika diff --git a/src/maggma/stores/aws.py b/src/maggma/stores/aws.py index f0bfd47ed..5fc8149f0 100644 --- a/src/maggma/stores/aws.py +++ b/src/maggma/stores/aws.py @@ -8,8 +8,8 @@ from concurrent.futures import wait from concurrent.futures.thread import ThreadPoolExecutor from hashlib import sha1 -from typing import Dict, Iterator, List, Optional, Tuple, Union from json import dumps +from typing import Dict, Iterator, List, Optional, Tuple, Union import msgpack # type: ignore from monty.msgpack import default as monty_default diff --git a/src/maggma/stores/azure.py b/src/maggma/stores/azure.py index 1c63a12b4..20fb18625 100644 --- a/src/maggma/stores/azure.py +++ b/src/maggma/stores/azure.py @@ -2,15 +2,15 @@ """ Advanced Stores for connecting to Microsoft Azure data """ +import os import threading import warnings import zlib from concurrent.futures import wait from concurrent.futures.thread import ThreadPoolExecutor from hashlib import sha1 -from typing import Dict, Iterator, List, Optional, Tuple, Union from json import dumps -import os +from typing import Dict, Iterator, List, Optional, Tuple, Union import msgpack # type: ignore from monty.msgpack import default as monty_default @@ -19,11 +19,11 @@ from maggma.utils import grouper, to_isoformat_ceil_ms try: + import azure import azure.storage.blob as azure_blob - from azure.storage.blob import BlobServiceClient, ContainerClient - from azure.identity import DefaultAzureCredential from azure.core.exceptions import ResourceExistsError - import azure + from azure.identity import DefaultAzureCredential + from azure.storage.blob import BlobServiceClient, ContainerClient except (ImportError, ModuleNotFoundError): azure_blob = None # type: ignore ContainerClient = None diff --git a/src/maggma/stores/file_store.py b/src/maggma/stores/file_store.py index 7a7184fb9..7eb8f6908 100644 --- a/src/maggma/stores/file_store.py +++ b/src/maggma/stores/file_store.py @@ -4,20 +4,20 @@ using typical maggma access patterns. """ +import fnmatch import hashlib import os -import fnmatch import re - import warnings -from pathlib import Path from datetime import datetime, timezone -from typing import Dict, List, Optional, Union, Iterator, Callable +from pathlib import Path +from typing import Callable, Dict, Iterator, List, Optional, Union -from pymongo import UpdateOne from monty.io import zopen -from maggma.core import StoreError, Sort -from maggma.stores.mongolike import MemoryStore, JSONStore +from pymongo import UpdateOne + +from maggma.core import Sort, StoreError +from maggma.stores.mongolike import JSONStore, MemoryStore # These keys are automatically populated by the FileStore.read() method and # hence are not allowed to be manually overwritten @@ -264,7 +264,7 @@ def _create_record_from_file(self, f: Path) -> Dict: self.key: file_id, } - def connect(self, force_reset: bool = False): + def connect(self): """ Connect to the source data @@ -273,9 +273,6 @@ def connect(self, force_reset: bool = False): If there is a metadata .json file in the directory, read its contents into the MemoryStore - - Args: - force_reset: whether to reset the connection or not """ # read all files and place them in the MemoryStore # use super.update to bypass the read_only guard statement diff --git a/src/maggma/stores/gridfs.py b/src/maggma/stores/gridfs.py index 2374d2082..e341e8fef 100644 --- a/src/maggma/stores/gridfs.py +++ b/src/maggma/stores/gridfs.py @@ -8,15 +8,15 @@ import copy import json import zlib -from ruamel import yaml from datetime import datetime -from pymongo.errors import ConfigurationError from typing import Any, Dict, Iterator, List, Optional, Tuple, Union import gridfs from monty.json import jsanitize from pydash import get, has from pymongo import MongoClient, uri_parser +from pymongo.errors import ConfigurationError +from ruamel import yaml from maggma.core import Sort, Store, StoreError from maggma.stores.mongolike import MongoStore, SSHTunnel diff --git a/src/maggma/stores/mongolike.py b/src/maggma/stores/mongolike.py index 70477ef8f..506c7936d 100644 --- a/src/maggma/stores/mongolike.py +++ b/src/maggma/stores/mongolike.py @@ -5,23 +5,24 @@ various utilities """ -from pathlib import Path -from ruamel import yaml +import warnings from itertools import chain, groupby +from pathlib import Path from socket import socket -import warnings + +from ruamel import yaml try: from typing import ( + Any, + Callable, Dict, Iterator, List, + Literal, Optional, Tuple, Union, - Any, - Callable, - Literal, ) except ImportError: from typing import Dict, Iterator, List, Optional, Tuple, Union, Any, Callable diff --git a/src/maggma/stores/shared_stores.py b/src/maggma/stores/shared_stores.py index 16fa60208..af9a48956 100644 --- a/src/maggma/stores/shared_stores.py +++ b/src/maggma/stores/shared_stores.py @@ -1,9 +1,11 @@ -from monty.json import MontyDecoder -from threading import Lock -from maggma.core.store import Store, Sort -from typing import Dict, Iterator, List, Optional, Tuple, Union, Callable, Any from functools import partial from multiprocessing.managers import BaseManager +from threading import Lock +from typing import Any, Callable, Dict, Iterator, List, Optional, Tuple, Union + +from monty.json import MontyDecoder + +from maggma.core.store import Sort, Store class StoreFacade(Store): diff --git a/src/maggma/utils.py b/src/maggma/utils.py index eb08ce620..6552bd1cc 100644 --- a/src/maggma/utils.py +++ b/src/maggma/utils.py @@ -7,11 +7,11 @@ import signal import uuid from datetime import datetime, timedelta -from dateutil import parser from importlib import import_module from typing import Dict, Iterable, Optional, Union from bson.json_util import ObjectId +from dateutil import parser from pydash.objects import get, has, set_ from pydash.objects import unset as _unset from pydash.utilities import to_path diff --git a/tests/api/test_aggregation_resource.py b/tests/api/test_aggregation_resource.py index a31a5ed0f..5589ac6df 100644 --- a/tests/api/test_aggregation_resource.py +++ b/tests/api/test_aggregation_resource.py @@ -1,3 +1,4 @@ +from datetime import datetime from random import randint import pytest @@ -5,11 +6,8 @@ from pydantic import BaseModel, Field from starlette.testclient import TestClient -from datetime import datetime from maggma.api.query_operator.core import QueryOperator - from maggma.api.resource import AggregationResource - from maggma.stores import MemoryStore diff --git a/tests/api/test_api.py b/tests/api/test_api.py index 82b0a66f3..de93a8556 100644 --- a/tests/api/test_api.py +++ b/tests/api/test_api.py @@ -1,7 +1,7 @@ from enum import Enum from random import choice, randint +from typing import Any, Tuple from urllib.parse import urlencode -from typing import Tuple, Any import pytest from fastapi.encoders import jsonable_encoder @@ -11,10 +11,10 @@ from maggma.api.API import API from maggma.api.query_operator import ( - StringQueryOperator, NumericQuery, - SparseFieldsQuery, PaginationQuery, + SparseFieldsQuery, + StringQueryOperator, ) from maggma.api.resource import ReadOnlyResource from maggma.stores import MemoryStore diff --git a/tests/api/test_post_resource.py b/tests/api/test_post_resource.py index 581587657..0825d4097 100644 --- a/tests/api/test_post_resource.py +++ b/tests/api/test_post_resource.py @@ -1,3 +1,4 @@ +from datetime import datetime from random import randint import pytest @@ -5,10 +6,7 @@ from pydantic import BaseModel, Field from starlette.testclient import TestClient -from datetime import datetime - from maggma.api.resource import PostOnlyResource - from maggma.stores import MemoryStore diff --git a/tests/api/test_query_operators.py b/tests/api/test_query_operators.py index a5794e3ec..76039d07f 100644 --- a/tests/api/test_query_operators.py +++ b/tests/api/test_query_operators.py @@ -1,19 +1,18 @@ -import pytest +from datetime import datetime from enum import Enum + +import pytest +from fastapi import HTTPException +from monty.serialization import dumpfn, loadfn +from monty.tempfile import ScratchDir +from pydantic import BaseModel, Field + from maggma.api.query_operator import ( NumericQuery, PaginationQuery, - SparseFieldsQuery, SortQuery, + SparseFieldsQuery, ) - -from pydantic import BaseModel, Field -from fastapi import HTTPException -from datetime import datetime - -from monty.serialization import loadfn, dumpfn -from monty.tempfile import ScratchDir - from maggma.api.query_operator.submission import SubmissionQuery diff --git a/tests/api/test_read_resource.py b/tests/api/test_read_resource.py index 8e28d85b9..d51c7984e 100644 --- a/tests/api/test_read_resource.py +++ b/tests/api/test_read_resource.py @@ -1,3 +1,4 @@ +import inspect from datetime import datetime from random import randint from urllib.parse import urlencode @@ -14,11 +15,8 @@ StringQueryOperator, ) from maggma.api.resource import ReadOnlyResource -from maggma.stores import MemoryStore, AliasingStore - -import inspect - from maggma.api.resource.core import HintScheme +from maggma.stores import AliasingStore, MemoryStore class Owner(BaseModel): diff --git a/tests/api/test_s3_url_resource.py b/tests/api/test_s3_url_resource.py index b865fdb22..a54139268 100644 --- a/tests/api/test_s3_url_resource.py +++ b/tests/api/test_s3_url_resource.py @@ -1,6 +1,7 @@ import pytest -from maggma.stores import MemoryStore + from maggma.api.resource import S3URLResource +from maggma.stores import MemoryStore @pytest.fixture diff --git a/tests/api/test_submission_resource.py b/tests/api/test_submission_resource.py index bd652df74..65a71f534 100644 --- a/tests/api/test_submission_resource.py +++ b/tests/api/test_submission_resource.py @@ -1,16 +1,15 @@ -from random import randint import json +from datetime import datetime +from random import randint + import pytest from fastapi import FastAPI from pydantic import BaseModel, Field from starlette.testclient import TestClient -from datetime import datetime +from maggma.api.query_operator import PaginationQuery from maggma.api.query_operator.core import QueryOperator - from maggma.api.resource import SubmissionResource -from maggma.api.query_operator import PaginationQuery - from maggma.stores import MemoryStore diff --git a/tests/api/test_utils.py b/tests/api/test_utils.py index 59b81cae5..7186e57ac 100644 --- a/tests/api/test_utils.py +++ b/tests/api/test_utils.py @@ -1,14 +1,13 @@ from datetime import datetime from enum import Enum +from typing import Union import pytest +from bson import ObjectId from monty.json import MSONable from pydantic import BaseModel, Field from maggma.api.utils import api_sanitize, serialization_helper -from typing import Union - -from bson import ObjectId class SomeEnum(Enum): diff --git a/tests/cli/test_distributed.py b/tests/cli/test_distributed.py index f7274fa05..71286dc0d 100644 --- a/tests/cli/test_distributed.py +++ b/tests/cli/test_distributed.py @@ -1,16 +1,15 @@ import asyncio import json +import socket as pysocket import threading import pytest +import zmq.asyncio as zmq +from zmq import REP, REQ from maggma.cli.distributed import find_port, manager, worker from maggma.core import Builder -from zmq import REP, REQ -import zmq.asyncio as zmq -import socket as pysocket - # TODO: Timeout errors? HOSTNAME = pysocket.gethostname() diff --git a/tests/stores/test_azure.py b/tests/stores/test_azure.py index af75f5db0..489df19e2 100644 --- a/tests/stores/test_azure.py +++ b/tests/stores/test_azure.py @@ -7,11 +7,12 @@ """ import time -from datetime import datetime from contextlib import contextmanager +from datetime import datetime + import pytest -from maggma.stores import MemoryStore, MongoStore, AzureBlobStore +from maggma.stores import AzureBlobStore, MemoryStore, MongoStore try: import azure.storage.blob as azure_blob diff --git a/tests/stores/test_file_store.py b/tests/stores/test_file_store.py index 68c330873..1ac29bfab 100644 --- a/tests/stores/test_file_store.py +++ b/tests/stores/test_file_store.py @@ -19,11 +19,12 @@ remain intact. """ +import hashlib from datetime import datetime, timezone from distutils.dir_util import copy_tree from pathlib import Path + import pytest -import hashlib from maggma.core import StoreError from maggma.stores.file_store import FileStore diff --git a/tests/stores/test_gridfs.py b/tests/stores/test_gridfs.py index 65d6540e2..e82ce1b75 100644 --- a/tests/stores/test_gridfs.py +++ b/tests/stores/test_gridfs.py @@ -1,16 +1,15 @@ -import os - import json +import os from datetime import datetime import numpy as np import numpy.testing.utils as nptu import pytest -from maggma.core import StoreError +from pymongo.errors import ConfigurationError +from maggma.core import StoreError from maggma.stores import GridFSStore, MongoStore -from maggma.stores.gridfs import files_collection_fields, GridFSURIStore -from pymongo.errors import ConfigurationError +from maggma.stores.gridfs import GridFSURIStore, files_collection_fields @pytest.fixture diff --git a/tests/stores/test_mongolike.py b/tests/stores/test_mongolike.py index 5715b76b3..7a0147719 100644 --- a/tests/stores/test_mongolike.py +++ b/tests/stores/test_mongolike.py @@ -1,14 +1,14 @@ -import orjson import os import shutil from datetime import datetime -from unittest import mock from pathlib import Path +from unittest import mock import mongomock.collection -from monty.tempfile import ScratchDir +import orjson import pymongo.collection import pytest +from monty.tempfile import ScratchDir from pymongo.errors import ConfigurationError, DocumentTooLarge, OperationFailure from maggma.core import StoreError diff --git a/tests/stores/test_shared_stores.py b/tests/stores/test_shared_stores.py index dc1b90224..663a83579 100644 --- a/tests/stores/test_shared_stores.py +++ b/tests/stores/test_shared_stores.py @@ -1,8 +1,8 @@ +import pymongo import pytest from pymongo.errors import DocumentTooLarge, OperationFailure -import pymongo -from maggma.stores import GridFSStore, MongoStore, MemoryStore +from maggma.stores import GridFSStore, MemoryStore, MongoStore from maggma.stores.shared_stores import MultiStore, StoreFacade from maggma.validators import JSONSchemaValidator diff --git a/tests/test_utils.py b/tests/test_utils.py index 7d1a31266..89cf971b7 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -7,6 +7,7 @@ import pytest +from maggma.utils import Timeout # dt_to_isoformat_ceil_ms,; isostr_to_dt, from maggma.utils import ( dynamic_import, grouper, @@ -16,8 +17,6 @@ to_isoformat_ceil_ms, ) -from maggma.utils import Timeout # dt_to_isoformat_ceil_ms,; isostr_to_dt, - def test_recursiveupdate(): d = {"a": {"b": 3}, "c": [4]}