Skip to content

Commit

Permalink
chore: fix ruff import formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
gjedlicska committed Jan 19, 2025
1 parent 035cd08 commit 811c584
Show file tree
Hide file tree
Showing 72 changed files with 84 additions and 16 deletions.
1 change: 1 addition & 0 deletions example/send_receive.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from devtools import debug

from specklepy.api import operations
from specklepy.api.wrapper import StreamWrapper

Expand Down
5 changes: 3 additions & 2 deletions example/units_none.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
from devtools import debug

from specklepy.api import operations
from specklepy.objects.geometry import Base
from specklepy.objects.units import Units
from specklepy.objects_v2.geometry import Base
from specklepy.objects_v2.units import Units

dct = {
"id": "1234abcd",
Expand Down
1 change: 1 addition & 0 deletions example/using_speckle_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

# the speckle.objects module exposes all speckle provided classes
from devtools import debug

from specklepy.api import operations
from specklepy.objects import Base

Expand Down
14 changes: 7 additions & 7 deletions src/speckle_automate/automation_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@

import httpx
from gql import gql
from specklepy.api import operations
from specklepy.api.client import SpeckleClient
from specklepy.core.api.models import Branch
from specklepy.logging.exceptions import SpeckleException
from specklepy.objects.base import Base
from specklepy.transports.memory import MemoryTransport
from specklepy.transports.server import ServerTransport

from speckle_automate.schema import (
AutomateBase,
Expand All @@ -23,6 +16,13 @@
ObjectResultLevel,
ResultCase,
)
from specklepy.api import operations
from specklepy.api.client import SpeckleClient
from specklepy.core.api.models import Branch
from specklepy.logging.exceptions import SpeckleException
from specklepy.objects.base import Base
from specklepy.transports.memory import MemoryTransport
from specklepy.transports.server import ServerTransport


@dataclass
Expand Down
2 changes: 1 addition & 1 deletion src/speckle_automate/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
from gql import gql
from pydantic import Field
from pydantic_settings import BaseSettings, SettingsConfigDict
from specklepy.api.client import SpeckleClient

from speckle_automate.schema import AutomationRunData, TestAutomationRunData
from specklepy.api.client import SpeckleClient


class TestAutomationEnvironment(BaseSettings):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from typing import List, Optional, overload

from deprecated import deprecated

from specklepy.core.api.inputs.user_inputs import UserProjectsFilter, UserUpdateInput
from specklepy.core.api.models import (
PendingStreamCollaborator,
Expand Down
1 change: 1 addition & 0 deletions src/specklepy/api/resources/current/other_user_resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from typing import List, Optional, Union

from deprecated import deprecated

from specklepy.core.api.models import (
ActivityCollection,
LimitedUser,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from typing import Any, Optional, Tuple

from gql import Client

from specklepy.core.api.credentials import Account
from specklepy.core.api.inputs.project_inputs import (
ProjectInviteCreateInput,
Expand Down
3 changes: 2 additions & 1 deletion src/specklepy/api/resources/current/subscription_resource.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
from typing import Callable, Optional, Sequence

from pydantic import BaseModel
from typing_extensions import TypeVar

from specklepy.core.api.models import (
ProjectModelsUpdatedMessage,
ProjectUpdatedMessage,
Expand All @@ -9,7 +11,6 @@
)
from specklepy.core.api.resources import SubscriptionResource as CoreResource
from specklepy.logging import metrics
from typing_extensions import TypeVar

TEventArgs = TypeVar("TEventArgs", bound=BaseModel)

Expand Down
1 change: 1 addition & 0 deletions src/specklepy/api/resources/deprecated/active_user.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from deprecated import deprecated

from specklepy.api.resources import ActiveUserResource
from specklepy.core.api.models.deprecated import FE1_DEPRECATION_VERSION

Expand Down
1 change: 1 addition & 0 deletions src/specklepy/api/resources/deprecated/branch.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from typing import Optional, Union

from deprecated import deprecated

from specklepy.api.models import Branch
from specklepy.core.api.models.deprecated import (
FE1_DEPRECATION_REASON,
Expand Down
1 change: 1 addition & 0 deletions src/specklepy/api/resources/deprecated/commit.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from typing import List, Optional, Union

from deprecated import deprecated

from specklepy.api.models import Commit
from specklepy.core.api.models.deprecated import (
FE1_DEPRECATION_REASON,
Expand Down
1 change: 1 addition & 0 deletions src/specklepy/api/resources/deprecated/object.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from typing import Dict, List

from deprecated import deprecated

from specklepy.core.api.models.deprecated import (
FE1_DEPRECATION_REASON,
FE1_DEPRECATION_VERSION,
Expand Down
1 change: 1 addition & 0 deletions src/specklepy/api/resources/deprecated/other_user.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from deprecated import deprecated

from specklepy.api.resources import OtherUserResource
from specklepy.core.api.models.deprecated import FE1_DEPRECATION_VERSION

Expand Down
1 change: 1 addition & 0 deletions src/specklepy/api/resources/deprecated/server.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from deprecated import deprecated

from specklepy.api.resources import ServerResource
from specklepy.core.api.models.deprecated import FE1_DEPRECATION_VERSION

Expand Down
1 change: 1 addition & 0 deletions src/specklepy/api/resources/deprecated/stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from typing import List, Optional

from deprecated import deprecated

from specklepy.api.models import PendingStreamCollaborator, Stream
from specklepy.core.api.models.deprecated import (
FE1_DEPRECATION_REASON,
Expand Down
1 change: 1 addition & 0 deletions src/specklepy/api/resources/deprecated/subscriptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from deprecated import deprecated
from graphql import DocumentNode

from specklepy.core.api.models.deprecated import (
FE1_DEPRECATION_REASON,
FE1_DEPRECATION_VERSION,
Expand Down
1 change: 1 addition & 0 deletions src/specklepy/api/resources/deprecated/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from typing import List, Optional, Union

from deprecated import deprecated

from specklepy.api.models import PendingStreamCollaborator, User
from specklepy.core.api.resources.deprecated.user import Resource as CoreResource
from specklepy.logging import metrics
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

from deprecated import deprecated
from gql import gql

from specklepy.core.api.inputs.user_inputs import UserProjectsFilter, UserUpdateInput
from specklepy.core.api.models import (
ActivityCollection,
Expand Down
1 change: 1 addition & 0 deletions src/specklepy/core/api/resources/current/model_resource.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from typing import Optional

from gql import gql

from specklepy.core.api.inputs.model_inputs import (
CreateModelInput,
DeleteModelInput,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

from deprecated import deprecated
from gql import gql

from specklepy.core.api.models import (
ActivityCollection,
LimitedUser,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from typing import Any, Optional, Tuple

from gql import Client, gql

from specklepy.core.api.credentials import Account
from specklepy.core.api.inputs.project_inputs import (
ProjectInviteCreateInput,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from typing import Optional

from gql import gql

from specklepy.core.api.inputs.project_inputs import (
ProjectCreateInput,
ProjectModelsFilter,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

import requests
from gql import gql

from specklepy.core.api.models import ServerInfo
from specklepy.core.api.resource import ResourceBase
from specklepy.logging.exceptions import GraphQLException
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
from gql import gql
from graphql import DocumentNode
from pydantic import BaseModel
from typing_extensions import TypeVar

from specklepy.core.api.models import (
ProjectModelsUpdatedMessage,
ProjectUpdatedMessage,
Expand All @@ -13,7 +15,6 @@
from specklepy.core.api.resource import ResourceBase
from specklepy.core.api.responses import DataResponse
from specklepy.logging.exceptions import SpeckleException
from typing_extensions import TypeVar

NAME = "subscribe"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from typing import Optional

from gql import gql

from specklepy.core.api.inputs.model_inputs import ModelVersionsFilter
from specklepy.core.api.inputs.version_inputs import (
CreateVersionInput,
Expand Down
1 change: 1 addition & 0 deletions src/specklepy/core/api/resources/deprecated/active_user.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from deprecated import deprecated

from specklepy.core.api.models.deprecated import FE1_DEPRECATION_VERSION
from specklepy.core.api.resources import ActiveUserResource

Expand Down
1 change: 1 addition & 0 deletions src/specklepy/core/api/resources/deprecated/branch.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from deprecated import deprecated
from gql import gql

from specklepy.core.api.models.deprecated import (
FE1_DEPRECATION_REASON,
FE1_DEPRECATION_VERSION,
Expand Down
1 change: 1 addition & 0 deletions src/specklepy/core/api/resources/deprecated/commit.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from deprecated import deprecated
from gql import gql

from specklepy.core.api.models.deprecated import (
FE1_DEPRECATION_REASON,
FE1_DEPRECATION_VERSION,
Expand Down
1 change: 1 addition & 0 deletions src/specklepy/core/api/resources/deprecated/object.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from typing import Dict, List

from gql import gql

from specklepy.core.api.resource import ResourceBase
from specklepy.objects.base import Base

Expand Down
1 change: 1 addition & 0 deletions src/specklepy/core/api/resources/deprecated/other_user.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from deprecated import deprecated

from specklepy.core.api.models.deprecated import FE1_DEPRECATION_VERSION
from specklepy.core.api.resources import OtherUserResource

Expand Down
1 change: 1 addition & 0 deletions src/specklepy/core/api/resources/deprecated/server.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from deprecated import deprecated

from specklepy.core.api.models.deprecated import FE1_DEPRECATION_VERSION
from specklepy.core.api.resources import ServerResource

Expand Down
1 change: 1 addition & 0 deletions src/specklepy/core/api/resources/deprecated/stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

from deprecated import deprecated
from gql import gql

from specklepy.core.api.models import (
ActivityCollection,
PendingStreamCollaborator,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from deprecated import deprecated
from gql import gql
from graphql import DocumentNode

from specklepy.core.api.models.deprecated import (
FE1_DEPRECATION_REASON,
FE1_DEPRECATION_VERSION,
Expand Down
1 change: 1 addition & 0 deletions src/specklepy/core/api/resources/deprecated/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

from deprecated import deprecated
from gql import gql

from specklepy.core.api.models import (
ActivityCollection,
PendingStreamCollaborator,
Expand Down
3 changes: 2 additions & 1 deletion src/specklepy/objects/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@
)
from warnings import warn

from stringcase import pascalcase

from specklepy.logging.exceptions import SpeckleException
from specklepy.transports.memory import MemoryTransport
from stringcase import pascalcase

PRIMITIVES = (int, float, str, bool)

Expand Down
1 change: 1 addition & 0 deletions src/specklepy/objects/tests/line_test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from devtools import debug

from specklepy.core.api.operations import deserialize, serialize
from specklepy.objects.geometry import Line, Point
from specklepy.objects.models.units import Units
Expand Down
1 change: 1 addition & 0 deletions src/specklepy/objects/tests/mesh_test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from devtools import debug

from specklepy.core.api.operations import deserialize, serialize
from specklepy.objects.geometry import Mesh

Expand Down
1 change: 1 addition & 0 deletions src/specklepy/objects/tests/point_test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from devtools import debug

from specklepy.core.api.operations import deserialize, serialize
from specklepy.objects.geometry import Point
from specklepy.objects.models.units import Units
Expand Down
1 change: 1 addition & 0 deletions src/specklepy/objects/tests/polyline_test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from devtools import debug

from specklepy.core.api.operations import deserialize, serialize
from specklepy.objects.geometry import Polyline
from specklepy.objects.models.units import Units
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from typing import Any, Collection, Dict, Generic, Iterable, Optional, Tuple, TypeVar

from attrs import define

from specklepy.objects.base import Base

ROOT: str = "__Root"
Expand Down
3 changes: 2 additions & 1 deletion src/specklepy/objects_v2/graph_traversal/traversal.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
from typing import Any, Callable, Collection, Iterable, Iterator, List, Optional, Set

from attrs import define
from specklepy.objects.base import Base
from typing_extensions import Protocol, final

from specklepy.objects.base import Base


class ITraversalRule(Protocol):
def get_members_to_traverse(self, o: Base) -> Set[str]:
Expand Down
1 change: 1 addition & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import random

import pytest

from specklepy.objects.base import Base


Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import pytest

from specklepy.api.client import SpeckleClient
from specklepy.core.api.inputs.project_inputs import ProjectCreateInput
from specklepy.core.api.inputs.user_inputs import UserProjectsFilter, UserUpdateInput
Expand Down
1 change: 1 addition & 0 deletions tests/integration/client/current/test_model_resource.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import pytest

from specklepy.api.client import SpeckleClient
from specklepy.core.api.inputs.model_inputs import (
CreateModelInput,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import pytest

from specklepy.api.client import SpeckleClient
from specklepy.core.api.models import User

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from typing import Optional

import pytest

from specklepy.api.client import SpeckleClient
from specklepy.core.api.inputs.project_inputs import (
ProjectCreateInput,
Expand Down
Loading

0 comments on commit 811c584

Please sign in to comment.