From a4410ec7c8835544697d3f9b6a575aaaa5301881 Mon Sep 17 00:00:00 2001 From: Johannes Roos Date: Fri, 23 Aug 2024 15:31:51 +0200 Subject: [PATCH] blacked --- poetry.lock | 73 +++++++++-------------------------------- reaktion/actor.py | 8 +++-- reaktion/contractors.py | 17 ++++++---- 3 files changed, 31 insertions(+), 67 deletions(-) diff --git a/poetry.lock b/poetry.lock index aae919b..2966915 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,10 +1,9 @@ -# This file is automatically @generated by Poetry 1.4.0 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand. [[package]] name = "aenum" version = "3.1.15" description = "Advanced Enumerations (compatible with Python's stdlib Enum), NamedTuples, and NamedConstants" -category = "main" optional = false python-versions = "*" files = [ @@ -17,7 +16,6 @@ files = [ name = "aioconsole" version = "0.7.0" description = "Asynchronous console and interfaces for asyncio" -category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -29,7 +27,6 @@ files = [ name = "aiohttp" version = "3.9.3" description = "Async http client/server framework (asyncio)" -category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -126,7 +123,6 @@ speedups = ["Brotli", "aiodns", "brotlicffi"] name = "aiosignal" version = "1.3.1" description = "aiosignal: a list of registered asynchronous callbacks" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -141,7 +137,6 @@ frozenlist = ">=1.1.0" name = "annotated-types" version = "0.4.0" description = "Reusable constraint types to use with typing.Annotated" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -156,7 +151,6 @@ typing-extensions = {version = ">=4.0.0", markers = "python_version < \"3.9\""} name = "anyio" version = "4.2.0" description = "High level compatibility layer for multiple asynchronous event loop implementations" -category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -179,7 +173,6 @@ trio = ["trio (>=0.23)"] name = "arkitekt" version = "0.7.8" description = "client for the arkitekt platform" -category = "dev" optional = false python-versions = ">=3.8,<4.0" files = [ @@ -211,7 +204,6 @@ unlok = ["unlok (>=0.1.19)"] name = "async-timeout" version = "4.0.3" description = "Timeout context manager for asyncio programs" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -223,7 +215,6 @@ files = [ name = "attrs" version = "23.2.0" description = "Classes Without Boilerplate" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -243,7 +234,6 @@ tests-no-zope = ["attrs[tests-mypy]", "cloudpickle", "hypothesis", "pympler", "p name = "autoflake" version = "1.7.8" description = "Removes unused imports and unused variables" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -259,7 +249,6 @@ tomli = {version = ">=2.0.1", markers = "python_version < \"3.11\""} name = "black" version = "22.12.0" description = "The uncompromising code formatter." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -295,7 +284,6 @@ uvloop = ["uvloop (>=0.15.2)"] name = "certifi" version = "2023.11.17" description = "Python package for providing Mozilla's CA Bundle." -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -307,7 +295,6 @@ files = [ name = "click" version = "8.1.7" description = "Composable command line interface toolkit" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -322,7 +309,6 @@ colorama = {version = "*", markers = "platform_system == \"Windows\""} name = "colorama" version = "0.4.6" description = "Cross-platform colored terminal text." -category = "dev" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" files = [ @@ -334,7 +320,6 @@ files = [ name = "commonmark" version = "0.9.1" description = "Python parser for the CommonMark Markdown spec" -category = "dev" optional = false python-versions = "*" files = [ @@ -349,7 +334,6 @@ test = ["flake8 (==3.7.8)", "hypothesis (==3.55.3)"] name = "coverage" version = "7.4.1" description = "Code coverage measurement for Python" -category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -417,7 +401,6 @@ toml = ["tomli"] name = "docstring-parser" version = "0.15" description = "Parse Python docstrings in reST, Google and Numpydoc format" -category = "main" optional = false python-versions = ">=3.6,<4.0" files = [ @@ -429,7 +412,6 @@ files = [ name = "dokker" version = "0.1.25" description = "" -category = "dev" optional = false python-versions = ">=3.8,<4.0" files = [ @@ -451,7 +433,6 @@ cookiecutter = ["cookiecutter (>=2.5.0,<3.0.0)"] name = "exceptiongroup" version = "1.2.0" description = "Backport of PEP 654 (exception groups)" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -466,7 +447,6 @@ test = ["pytest (>=6)"] name = "fakts" version = "0.4.1" description = "asynchronous configuration provider ( tailored to support dynamic client-server relations)" -category = "dev" optional = false python-versions = ">=3.8,<4.0" files = [ @@ -488,7 +468,6 @@ remote = ["aiohttp (>=3.8.2,<4.0.0)", "certifi (>2021)"] name = "fluss" version = "0.1.61" description = "" -category = "main" optional = false python-versions = ">=3.8,<4.0" files = [ @@ -499,11 +478,24 @@ files = [ [package.dependencies] rath = ">=0.4.6" +[[package]] +name = "fluss-next" +version = "0.1.61" +description = "" +optional = false +python-versions = "<4.0,>=3.8" +files = [ + {file = "fluss_next-0.1.61-py3-none-any.whl", hash = "sha256:5047e00019685e859e3db6c20be48aeafa3287768a4c4ee36b791ae99fa450bc"}, + {file = "fluss_next-0.1.61.tar.gz", hash = "sha256:f4c837e5580f91eb926ffee9f6b84a272b71b78d8a95d26c6a995b360847b21f"}, +] + +[package.dependencies] +rath = ">=0.4.6" + [[package]] name = "frozenlist" version = "1.4.1" description = "A list-like structure which implements collections.abc.MutableSequence" -category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -590,7 +582,6 @@ files = [ name = "graphql-core" version = "3.2.3" description = "GraphQL implementation for Python, a port of GraphQL.js, the JavaScript reference implementation for GraphQL." -category = "main" optional = false python-versions = ">=3.6,<4" files = [ @@ -602,7 +593,6 @@ files = [ name = "herre" version = "0.4.3" description = "oauth2/openid client tailored to pyqt and async environments" -category = "dev" optional = false python-versions = ">=3.8,<4.0" files = [ @@ -624,7 +614,6 @@ qt = ["QtPy (>=2.0.1,<3.0.0)"] name = "idna" version = "3.6" description = "Internationalized Domain Names in Applications (IDNA)" -category = "dev" optional = false python-versions = ">=3.5" files = [ @@ -636,7 +625,6 @@ files = [ name = "inflection" version = "0.5.1" description = "A port of Ruby on Rails inflector to Python" -category = "main" optional = false python-versions = ">=3.5" files = [ @@ -648,7 +636,6 @@ files = [ name = "iniconfig" version = "2.0.0" description = "brain-dead simple config-ini parsing" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -660,7 +647,6 @@ files = [ name = "janus" version = "1.0.0" description = "Mixed sync-async queue to interoperate between asyncio tasks and classic threads" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -675,7 +661,6 @@ typing-extensions = ">=3.7.4.3" name = "koil" version = "0.3.6" description = "Async for a sync world" -category = "main" optional = false python-versions = ">=3.8,<4.0" files = [ @@ -695,7 +680,6 @@ uvloop = ["uvloop (>=0.16.0,<0.17.0)"] name = "multidict" version = "6.0.5" description = "multidict implementation" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -795,7 +779,6 @@ files = [ name = "mypy-extensions" version = "1.0.0" description = "Type system extensions for programs checked with the mypy type checker." -category = "dev" optional = false python-versions = ">=3.5" files = [ @@ -807,7 +790,6 @@ files = [ name = "oauthlib" version = "3.2.2" description = "A generic, spec-compliant, thorough implementation of the OAuth request-signing logic" -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -824,7 +806,6 @@ signedtoken = ["cryptography (>=3.0.0)", "pyjwt (>=2.0.0,<3)"] name = "packaging" version = "23.2" description = "Core utilities for Python packages" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -836,7 +817,6 @@ files = [ name = "pathspec" version = "0.12.1" description = "Utility library for gitignore style pattern matching of file paths." -category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -848,7 +828,6 @@ files = [ name = "platformdirs" version = "4.2.0" description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." -category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -864,7 +843,6 @@ test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.4.3)", "pytest- name = "pluggy" version = "1.4.0" description = "plugin and hook calling mechanisms for python" -category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -880,7 +858,6 @@ testing = ["pytest", "pytest-benchmark"] name = "pydantic" version = "1.10.14" description = "Data validation and settings management using python type hints" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -933,7 +910,6 @@ email = ["email-validator (>=1.0.3)"] name = "pyflakes" version = "2.5.0" description = "passive checker of Python programs" -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -945,7 +921,6 @@ files = [ name = "pygments" version = "2.17.2" description = "Pygments is a syntax highlighting package written in Python." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -961,7 +936,6 @@ windows-terminal = ["colorama (>=0.4.6)"] name = "pytest" version = "7.4.4" description = "pytest: simple powerful testing with Python" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -984,7 +958,6 @@ testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "no name = "pytest-asyncio" version = "0.20.3" description = "Pytest support for asyncio" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1003,7 +976,6 @@ testing = ["coverage (>=6.2)", "flaky (>=3.5.0)", "hypothesis (>=5.7.1)", "mypy name = "pytest-cov" version = "4.1.0" description = "Pytest plugin for measuring coverage." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1022,7 +994,6 @@ testing = ["fields", "hunter", "process-tests", "pytest-xdist", "six", "virtuale name = "pyyaml" version = "6.0.1" description = "YAML parser and emitter for Python" -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -1083,7 +1054,6 @@ files = [ name = "qtpy" version = "2.4.1" description = "Provides an abstraction layer on top of the various Qt bindings (PyQt5/6 and PySide2/6)." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1101,7 +1071,6 @@ test = ["pytest (>=6,!=7.0.0,!=7.0.1)", "pytest-cov (>=3.0.0)", "pytest-qt"] name = "rath" version = "0.5.0" description = "async transport-agnostic graphql client" -category = "main" optional = false python-versions = ">=3.8,<4.0" files = [ @@ -1124,7 +1093,6 @@ websockets = ["websockets (>=10.2,<11.0)"] name = "rekuest" version = "0.2.29" description = "rpc and node backbone" -category = "main" optional = false python-versions = ">=3.7,<4.0" files = [ @@ -1145,7 +1113,6 @@ websockets = ">=10.0,<11.0" name = "rich" version = "11.2.0" description = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal" -category = "dev" optional = false python-versions = ">=3.6.2,<4.0.0" files = [ @@ -1165,7 +1132,6 @@ jupyter = ["ipywidgets (>=7.5.1,<8.0.0)"] name = "rich-click" version = "1.7.3" description = "Format click help output nicely with rich" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1185,7 +1151,6 @@ dev = ["flake8", "flake8-docstrings", "mypy", "packaging", "pre-commit", "pytest name = "sniffio" version = "1.3.0" description = "Sniff out which async library your code is running under" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1197,7 +1162,6 @@ files = [ name = "tomli" version = "2.0.1" description = "A lil' TOML parser" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1209,7 +1173,6 @@ files = [ name = "turms" version = "0.5.0" description = "graphql-codegen powered by pydantic" -category = "dev" optional = false python-versions = ">=3.9,<4.0" files = [ @@ -1234,7 +1197,6 @@ merge = ["libcst (>=0.4.9,<0.5.0)"] name = "typing-extensions" version = "4.9.0" description = "Backported and Experimental Type Hints for Python 3.8+" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -1246,7 +1208,6 @@ files = [ name = "watchfiles" version = "0.18.1" description = "Simple, modern and high performance file watching and code reload in python." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1277,7 +1238,6 @@ anyio = ">=3.0.0" name = "websockets" version = "10.4" description = "An implementation of the WebSocket Protocol (RFC 6455 & 7692)" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1356,7 +1316,6 @@ files = [ name = "yarl" version = "1.9.4" description = "Yet another URL library" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1459,4 +1418,4 @@ multidict = ">=4.0" [metadata] lock-version = "2.0" python-versions = " >=3.8,<4.0" -content-hash = "17985d14da6529d566d1238897859621be4c3ce496b7289bfd618190056dd599" +content-hash = "92a37a0c1da40848735f3a28aadfa9efd6c8fe4976bc857c2780d70fd3a28bd4" diff --git a/reaktion/actor.py b/reaktion/actor.py index d8a2d97..64ca487 100644 --- a/reaktion/actor.py +++ b/reaktion/actor.py @@ -325,9 +325,11 @@ async def ass_log(assignation: Assignation, level, message): source=event.source, handle=event.handle, caused_by=event.caused_by, - value=event.value - if event.value and not isinstance(event.value, Exception) - else str(event.value), + value=( + event.value + if event.value and not isinstance(event.value, Exception) + else str(event.value) + ), type=event.type, t=t, ) diff --git a/reaktion/contractors.py b/reaktion/contractors.py index ce87dda..9fc28ca 100644 --- a/reaktion/contractors.py +++ b/reaktion/contractors.py @@ -13,8 +13,9 @@ @runtime_checkable class NodeContractor(Protocol): - async def __call__(self, node: ArkitektNodeFragment, actor: Actor) -> RPCContract: - ... + async def __call__( + self, node: ArkitektNodeFragment, actor: Actor + ) -> RPCContract: ... async def arkicontractor(node: ArkitektNodeFragment, actor: Actor) -> RPCContract: @@ -39,11 +40,13 @@ async def arkicontractor(node: ArkitektNodeFragment, actor: Actor) -> RPCContrac arkinode.scope == NodeScope.GLOBAL ), "Non GlobalNodes that are not implemented on this agent cannot be put into a workflow" return arkiuse( - binds=ReserveBindsInput( - clients=node.binds.clients, templates=node.binds.templates - ) - if node.binds - else None, + binds=( + ReserveBindsInput( + clients=node.binds.clients, templates=node.binds.templates + ) + if node.binds + else None + ), hash=node.hash, postman=get_current_postman(), provision=actor.passport.provision,