Skip to content

Commit

Permalink
update black
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilWun authored and buehlefs committed Jan 31, 2024
1 parent a36e63d commit b4bdd64
Show file tree
Hide file tree
Showing 10 changed files with 202 additions and 294 deletions.
6 changes: 3 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@
autosectionlabel_prefix_document = False
autosectionlabel_maxdepth = None

intersphinx_mapping: Optional[
Dict[str, Tuple[str, Union[Optional[str], Tuple[str]]]]
] = None
intersphinx_mapping: Optional[Dict[str, Tuple[str, Union[Optional[str], Tuple[str]]]]] = (
None
)
intersphinx_timeout = 30

source_suffix = {
Expand Down
1 change: 1 addition & 0 deletions migrations/versions/a09e03db46a1_add_virtual_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Create Date: 2023-05-05 05:48:10.261809
"""

import sqlalchemy as sa
from alembic import op
from sqlalchemy.dialects import sqlite
Expand Down
1 change: 1 addition & 0 deletions migrations/versions/ae51830d0cb5_initial_migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Create Date: 2021-12-22 09:20:45.597322
"""

from alembic import op
import sqlalchemy as sa

Expand Down
1 change: 1 addition & 0 deletions migrations/versions/b889171b490f_id_to_key_datablob.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Create Date: 2023-11-09 12:33:37.697251
"""

import sqlalchemy as sa
from alembic import op

Expand Down
431 changes: 166 additions & 265 deletions poetry.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ blinker = "^1.6.2"
urllib3 = "^1.26" # we use this version to avoid a dependency conflict with Qiskit dependencies that don't support version 2 yet

[tool.poetry.dev-dependencies]
black = ">=23.1.0"
black = ">=24.1.1,<24.2.0"
flake8 = "^3.9.2"
pytest = "^6.2.4"
flake8-docstrings = "^1.6.0"
Expand Down
6 changes: 3 additions & 3 deletions qhana_plugin_runner/db/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
def register_db(app: Flask):
"""Register the sqlalchemy db and alembic migrations with the flask app."""
if not app.config.get("SQLALCHEMY_DATABASE_URI"):
app.config[
"SQLALCHEMY_DATABASE_URI"
] = f"sqlite:///{app.instance_path}/{app.import_name}.db"
app.config["SQLALCHEMY_DATABASE_URI"] = (
f"sqlite:///{app.instance_path}/{app.import_name}.db"
)

DB.init_app(app)
app.logger.info(f'Connected to db "{app.config["SQLALCHEMY_DATABASE_URI"]}".')
Expand Down
12 changes: 5 additions & 7 deletions qhana_plugin_runner/plugin_utils/entity_marshalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ def from_iter(cls, iterable: Sequence):
return cls(*iterable)


_ENTITY_TYPE_TUPLE_CLASSES: Dict[
Tuple[str, ...], Type[NamedTuple]
] = {} # TODO cache invalidation (use lru cache?)
_ENTITY_TYPE_TUPLE_CLASSES: Dict[Tuple[str, ...], Type[NamedTuple]] = (
{}
) # TODO cache invalidation (use lru cache?)


def get_entity_tuple_class(
Expand Down Expand Up @@ -138,16 +138,14 @@ def json(
parse_constant: Optional[Callable[[str], Any]] = None,
object_pairs_hook: Optional[Callable[[List[Tuple[Any, Any]]], Any]] = None,
**kwds: Any,
) -> Any:
...
) -> Any: ...

def iter_lines(
self,
chunk_size: int = 512,
decode_unicode: bool = False,
delimiter: Optional[Union[Text, bytes]] = None,
) -> Iterator[Any]:
...
) -> Iterator[Any]: ...


def entity_attribute_sort_key(attribute_name: str):
Expand Down
12 changes: 6 additions & 6 deletions stable_plugins/muse/costume_loader_pkg/backend/entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,9 @@ def _create_table_column_dicts(
)

tables[Attribute.dominanteCharaktereigenschaft] = dominant_character_trait_table
columns[
Attribute.dominanteCharaktereigenschaft
] = dominant_character_trait_table.c.DominanteCharaktereigenschaft
columns[Attribute.dominanteCharaktereigenschaft] = (
dominant_character_trait_table.c.DominanteCharaktereigenschaft
)

###################
# Stereotyp table #
Expand Down Expand Up @@ -311,9 +311,9 @@ def _create_table_column_dicts(
)

tables[Attribute.koerpermodifikation] = body_modification_table
columns[
Attribute.koerpermodifikation
] = body_modification_table.c.Koerpermodifikationname
columns[Attribute.koerpermodifikation] = (
body_modification_table.c.Koerpermodifikationname
)

#########################
# KostuemTimecode table #
Expand Down
24 changes: 15 additions & 9 deletions stable_plugins/workflow/workflows/management_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,15 +315,21 @@ def get(self, process_definition_id: str):

return PluginMetadata(
title=title,
description=plugin.description
if plugin
else process_definition.get("description", ""),
name=plugin.name
if plugin and plugin.name
else process_definition.get("key", process_definition_id),
version=plugin.version
if plugin and plugin.version is not None
else str(process_definition.get("version", 1)),
description=(
plugin.description
if plugin
else process_definition.get("description", "")
),
name=(
plugin.name
if plugin and plugin.name
else process_definition.get("key", process_definition_id)
),
version=(
plugin.version
if plugin and plugin.version is not None
else str(process_definition.get("version", 1))
),
tags=plugin.tag_list if plugin else ["workflow", "bpmn"],
type=PluginType.processing,
entry_point=EntryPoint(
Expand Down

0 comments on commit b4bdd64

Please sign in to comment.