Skip to content

Commit

Permalink
Run ruff check --fix on project
Browse files Browse the repository at this point in the history
  • Loading branch information
rkingsbury committed Jun 27, 2023
1 parent 7a3fad3 commit c2e6dbb
Show file tree
Hide file tree
Showing 15 changed files with 12 additions and 23 deletions.
1 change: 0 additions & 1 deletion src/maggma/api/API.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from monty.json import MSONable
from starlette.responses import RedirectResponse

from maggma import __version__
from maggma.api.resource import Resource


Expand Down
4 changes: 2 additions & 2 deletions src/maggma/api/query_operator/sorting.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from typing import Optional, List
from typing import Optional

from fastapi import HTTPException, Query
from fastapi import Query

from maggma.api.query_operator import QueryOperator
from maggma.api.utils import STORE_PARAMS
Expand Down
2 changes: 1 addition & 1 deletion src/maggma/builders/projection_builder.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from copy import deepcopy
from datetime import datetime
from itertools import chain
from typing import Dict, Iterable, List, Set, Union
from typing import Dict, Iterable, List, Union

from pydash import get

Expand Down
2 changes: 1 addition & 1 deletion src/maggma/core/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import logging
from abc import ABCMeta, abstractmethod
from typing import Any, Dict, Iterable, List, Optional, Union
from typing import Any, Dict, Iterable, List, Union

from monty.json import MontyDecoder, MSONable

Expand Down
2 changes: 1 addition & 1 deletion src/maggma/core/store.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from abc import ABCMeta, abstractmethod, abstractproperty
from datetime import datetime
from enum import Enum
from typing import Callable, Dict, Iterator, List, Optional, Tuple, Union
from typing import Dict, Iterator, List, Optional, Tuple, Union

from monty.dev import deprecated
from monty.json import MontyDecoder, MSONable
Expand Down
2 changes: 1 addition & 1 deletion src/maggma/stores/aws.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from concurrent.futures import wait
from concurrent.futures.thread import ThreadPoolExecutor
from hashlib import sha1
from typing import Any, Dict, Iterator, List, Optional, Tuple, Union
from typing import Dict, Iterator, List, Optional, Tuple, Union
from json import dumps

import msgpack # type: ignore
Expand Down
2 changes: 1 addition & 1 deletion src/maggma/stores/compound_stores.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
""" Special stores that combine underlying Stores together """
from datetime import datetime
from itertools import groupby
from typing import Any, Dict, Iterator, List, Optional, Tuple, Union
from typing import Dict, Iterator, List, Optional, Tuple, Union

from pydash import set_
from pymongo import MongoClient
Expand Down
3 changes: 1 addition & 2 deletions tests/api/test_aggregation_resource.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
from random import randint
from urllib.parse import urlencode

import pytest
from fastapi import FastAPI, Body
from fastapi import FastAPI
from pydantic import BaseModel, Field
from starlette.testclient import TestClient

Expand Down
3 changes: 1 addition & 2 deletions tests/api/test_query_operators.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@
NumericQuery,
PaginationQuery,
SparseFieldsQuery,
NumericQuery,
SortQuery,
)

from pydantic import BaseModel, Field
from fastapi import HTTPException, Query
from fastapi import HTTPException
from datetime import datetime

from monty.serialization import loadfn, dumpfn
Expand Down
6 changes: 2 additions & 4 deletions tests/api/test_submission_resource.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
from random import randint
from urllib.parse import urlencode
from pydantic.utils import get_model
import json
import pytest
from fastapi import FastAPI, Body
from fastapi import FastAPI
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 SubmissionResource, post_resource
from maggma.api.resource import SubmissionResource
from maggma.api.query_operator import PaginationQuery

from maggma.stores import MemoryStore
Expand Down
1 change: 0 additions & 1 deletion tests/cli/test_init.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import os
import shutil
from datetime import datetime
from pathlib import Path
Expand Down
1 change: 0 additions & 1 deletion tests/cli/test_multiprocessing.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import asyncio
import time
from concurrent.futures import ThreadPoolExecutor

Expand Down
3 changes: 0 additions & 3 deletions tests/stores/test_aws.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
import time
import zlib
from datetime import datetime

import boto3
import msgpack
import pytest
from botocore.exceptions import ClientError
from monty.msgpack import default, object_hook
from moto import mock_s3

from maggma.stores import MemoryStore, MongoStore, S3Store
Expand Down
2 changes: 1 addition & 1 deletion tests/stores/test_shared_stores.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def test_multistore_update(multistore, mongostore):
mongostore_facade.update([large_doc, {"e": 1001}], key="e")

mongostore_facade.safe_update = True
assert mongostore_facade.safe_update == True
assert mongostore_facade.safe_update is True
mongostore_facade.update([large_doc, {"e": 1001}], key="e")
assert mongostore_facade.query_one({"e": 1001}) is not None

Expand Down
1 change: 0 additions & 1 deletion tests/stores/test_ssh_tunnel.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import asyncio

import paramiko
import pymongo
Expand Down

0 comments on commit c2e6dbb

Please sign in to comment.