Skip to content

Commit

Permalink
Black reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
JR-Morgan committed Dec 9, 2024
1 parent 0bd9729 commit a05ac34
Show file tree
Hide file tree
Showing 13 changed files with 54 additions and 56 deletions.
52 changes: 26 additions & 26 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ attrs = "^23.1.0"
httpx = "^0.25.0"

[tool.poetry.group.dev.dependencies]
black = "24.3.0"
black = "24.10.0"
isort = "^5.13.2"
pytest = "^7.1.3"
pytest-asyncio = "^0.23.0"
Expand Down
1 change: 1 addition & 0 deletions src/speckle_automate/fixtures.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Some useful helpers for working with automation data."""

import secrets
import string

Expand Down
12 changes: 4 additions & 8 deletions src/speckle_automate/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,13 @@ class FunctionRunData(AutomateBase):
def execute_automate_function(
automate_function: AutomateFunction[T],
input_schema: type[T],
) -> None:
...
) -> None: ...


@overload
def execute_automate_function(
automate_function: AutomateFunctionWithoutInputs,
) -> None:
...
) -> None: ...


class AutomateGenerateJsonSchema(GenerateJsonSchema):
Expand Down Expand Up @@ -146,16 +144,14 @@ def run_function(
automation_context: AutomationContext,
automate_function: AutomateFunction[T],
inputs: T,
) -> AutomationContext:
...
) -> AutomationContext: ...


@overload
def run_function(
automation_context: AutomationContext,
automate_function: AutomateFunctionWithoutInputs,
) -> AutomationContext:
...
) -> AutomationContext: ...


def run_function(
Expand Down
6 changes: 2 additions & 4 deletions src/specklepy/api/resources/current/active_user_resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,10 @@ def update(
company: Optional[str] = None,
bio: Optional[str] = None,
avatar: Optional[str] = None,
) -> User:
...
) -> User: ...

@overload
def update(self, *, input: UserUpdateInput) -> User:
...
def update(self, *, input: UserUpdateInput) -> User: ...

def update(
self,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,10 @@ def update(
company: Optional[str] = None,
bio: Optional[str] = None,
avatar: Optional[str] = None,
) -> User:
...
) -> User: ...

@overload
def update(self, *, input: UserUpdateInput) -> User:
...
def update(self, *, input: UserUpdateInput) -> User: ...

def update(
self,
Expand Down
14 changes: 8 additions & 6 deletions src/specklepy/core/api/resources/current/model_resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,11 @@ def get_with_versions(
"modelId": model_id,
"versionsLimit": versions_limit,
"versionsCursor": versions_cursor,
"versionsFilter": versions_filter.model_dump(warnings="error")
if versions_filter
else None,
"versionsFilter": (
versions_filter.model_dump(warnings="error")
if versions_filter
else None
),
}

return self.make_request_and_parse_response(
Expand Down Expand Up @@ -179,9 +181,9 @@ def get_models(
"projectId": project_id,
"modelsLimit": models_limit,
"modelsCursor": models_cursor,
"modelsFilter": models_filter.model_dump(warnings="error")
if models_filter
else None,
"modelsFilter": (
models_filter.model_dump(warnings="error") if models_filter else None
),
}

return self.make_request_and_parse_response(
Expand Down
6 changes: 3 additions & 3 deletions src/specklepy/core/api/resources/current/project_resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ def get_with_models(
"projectId": project_id,
"modelsLimit": models_limit,
"modelsCursor": models_cursor,
"modelsFilter": models_filter.model_dump(warnings="error")
if models_filter
else None,
"modelsFilter": (
models_filter.model_dump(warnings="error") if models_filter else None
),
}

return self.make_request_and_parse_response(
Expand Down
1 change: 1 addition & 0 deletions src/specklepy/core/helpers/speckle_path_provider.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Provides uniform and consistent path helpers for `specklepy`
"""

import os
import sys
from pathlib import Path
Expand Down
6 changes: 3 additions & 3 deletions src/specklepy/objects/other.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,9 +295,9 @@ class RevitParameter(Base, speckle_type="Objects.BuiltElements.Revit.Parameter")
value: Any = None
applicationUnitType: Optional[str] = None # eg UnitType UT_Length
applicationUnit: Optional[str] = None # DisplayUnitType eg DUT_MILLIMITERS
applicationInternalName: Optional[
str
] = None # BuiltInParameterName or GUID for shared parameter
applicationInternalName: Optional[str] = (
None # BuiltInParameterName or GUID for shared parameter
)
isShared: bool = False
isReadOnly: bool = False
isTypeParameter: bool = False
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Run integration tests with a speckle server."""

import os
from pathlib import Path
from typing import Dict
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def line(point, interval):
start=point,
end=point,
domain=interval,
units="none"
units="none",
# These attributes are not handled in C#
# bbox=None,
# length=None
Expand Down
1 change: 1 addition & 0 deletions utils/installer.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Provides uniform and consistent path helpers for `specklepy`
"""

import os
import sys
from importlib import import_module, invalidate_caches
Expand Down

0 comments on commit a05ac34

Please sign in to comment.