Skip to content

Commit

Permalink
packages upgraded (airtai#1306)
Browse files Browse the repository at this point in the history
  • Loading branch information
davorrunje authored Mar 14, 2024
1 parent d7fef0c commit c1a159d
Show file tree
Hide file tree
Showing 4 changed files with 126 additions and 93 deletions.
4 changes: 2 additions & 2 deletions .secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
"filename": "docs/docs/en/release.md",
"hashed_secret": "35675e68f4b5af7b995d9205ad0fc43842f16450",
"is_verified": false,
"line_number": 689,
"line_number": 710,
"is_secret": false
}
],
Expand Down Expand Up @@ -163,5 +163,5 @@
}
]
},
"generated_at": "2024-03-04T15:19:29Z"
"generated_at": "2024-03-14T06:43:32Z"
}
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ docs = [

# dev dependencies
devdocs = [
"mkdocs-material==9.5.11",
"mkdocs-material==9.5.13",
"mkdocs-static-i18n==1.2.0",
"mdx-include==1.4.2",
"mkdocstrings[python]==0.24.1",
Expand All @@ -106,16 +106,16 @@ lint = [
"types-Pygments",
"types-docutils",
"confluent-kafka-stubs; python_version >= '3.11'",
"mypy==1.8.0",
"mypy==1.9.0",
"ruff==0.3.0",
"bandit==1.7.7",
"bandit==1.7.8",
"semgrep==1.62.0",
]

test-core = [
"coverage[toml]==7.4.3",
"pytest==8.0.1",
"pytest-asyncio==0.23.5",
"pytest-asyncio==0.23.5.post1",
"dirty-equals==0.7.1.post0",
"pytest-timeout==2.2.0",
"pytest-rerunfailures==13.0",
Expand Down
57 changes: 19 additions & 38 deletions tests/asyncapi/base/arguments.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ def test_custom_naming(self):
broker = self.broker_class()

@broker.subscriber("test", title="custom_name", description="test description")
async def handle(msg):
...
async def handle(msg): ...

schema = get_app_schema(self.build_app(broker)).to_jsonable()
key = tuple(schema["channels"].keys())[0] # noqa: RUF015
Expand All @@ -54,8 +53,7 @@ def test_no_type(self):
broker = self.broker_class()

@broker.subscriber("test")
async def handle(msg):
...
async def handle(msg): ...

schema = get_app_schema(self.build_app(broker)).to_jsonable()

Expand All @@ -69,8 +67,7 @@ def test_simple_type(self):
broker = self.broker_class()

@broker.subscriber("test")
async def handle(msg: int):
...
async def handle(msg: int): ...

schema = get_app_schema(self.build_app(broker)).to_jsonable()

Expand All @@ -85,8 +82,7 @@ def test_simple_optional_type(self):
broker = self.broker_class()

@broker.subscriber("test")
async def handle(msg: Optional[int]):
...
async def handle(msg: Optional[int]): ...

schema = get_app_schema(self.build_app(broker)).to_jsonable()

Expand All @@ -110,8 +106,7 @@ def test_simple_type_with_default(self):
broker = self.broker_class()

@broker.subscriber("test")
async def handle(msg: int = 1):
...
async def handle(msg: int = 1): ...

schema = get_app_schema(self.build_app(broker)).to_jsonable()

Expand All @@ -129,8 +124,7 @@ def test_multi_args_no_type(self):
broker = self.broker_class()

@broker.subscriber("test")
async def handle(msg, another):
...
async def handle(msg, another): ...

schema = get_app_schema(self.build_app(broker)).to_jsonable()

Expand All @@ -152,8 +146,7 @@ def test_multi_args_with_type(self):
broker = self.broker_class()

@broker.subscriber("test")
async def handle(msg: str, another: int):
...
async def handle(msg: str, another: int): ...

schema = get_app_schema(self.build_app(broker)).to_jsonable()

Expand All @@ -175,8 +168,7 @@ def test_multi_args_with_default(self):
broker = self.broker_class()

@broker.subscriber("test")
async def handle(msg: str, another: Optional[int] = None):
...
async def handle(msg: str, another: Optional[int] = None): ...

schema = get_app_schema(self.build_app(broker)).to_jsonable()

Expand Down Expand Up @@ -215,8 +207,7 @@ class User(pydantic.BaseModel):
broker = self.broker_class()

@broker.subscriber("test")
async def handle(user: User):
...
async def handle(user: User): ...

schema = get_app_schema(self.build_app(broker)).to_jsonable()

Expand Down Expand Up @@ -247,8 +238,7 @@ class User(pydantic.BaseModel):
broker = self.broker_class()

@broker.subscriber("test")
async def handle(user: User):
...
async def handle(user: User): ...

schema = get_app_schema(self.build_app(broker)).to_jsonable()

Expand Down Expand Up @@ -286,8 +276,7 @@ class User(pydantic.BaseModel):
broker = self.broker_class()

@broker.subscriber("test")
async def handle(user: User, description: str = ""):
...
async def handle(user: User, description: str = ""): ...

schema = get_app_schema(self.build_app(broker)).to_jsonable()

Expand Down Expand Up @@ -343,8 +332,7 @@ class Config:
broker = self.broker_class()

@broker.subscriber("test")
async def handle(user: User):
...
async def handle(user: User): ...

schema = get_app_schema(self.build_app(broker)).to_jsonable()

Expand Down Expand Up @@ -374,12 +362,10 @@ class User(pydantic.BaseModel):
"test",
filter=lambda m: m.content_type == "application/json",
)
async def handle(id: int):
...
async def handle(id: int): ...

@broker.subscriber("test")
async def handle_default(msg):
...
async def handle_default(msg): ...

schema = get_app_schema(self.build_app(broker)).to_jsonable()

Expand Down Expand Up @@ -410,8 +396,7 @@ def dep2(name2: str):
message = self.dependency_builder(dep)

@broker.subscriber("test", dependencies=dependencies)
async def handle(id: int, message=message):
...
async def handle(id: int, message=message): ...

schema = get_app_schema(self.build_app(broker)).to_jsonable()

Expand Down Expand Up @@ -445,8 +430,7 @@ class Sub(pydantic.BaseModel):
broker = self.broker_class()

@broker.subscriber("test")
async def handle(user: descriminator):
...
async def handle(user: descriminator): ...

schema = get_app_schema(self.build_app(broker)).to_jsonable()

Expand Down Expand Up @@ -497,8 +481,7 @@ class Model(pydantic.BaseModel):
broker = self.broker_class()

@broker.subscriber("test")
async def handle(user: Model):
...
async def handle(user: Model): ...

schema = get_app_schema(self.build_app(broker)).to_jsonable()

Expand Down Expand Up @@ -558,8 +541,7 @@ async def msg(
title="Perfect",
examples=[1],
),
):
...
): ...

schema = get_app_schema(self.build_app(broker)).to_jsonable()

Expand All @@ -581,8 +563,7 @@ def test_ignores_custom_field(self):
broker = self.broker_class()

@broker.subscriber("test")
async def handle(id: int, user: Optional[str] = None, message=Context()):
...
async def handle(id: int, user: Optional[str] = None, message=Context()): ...

schema = get_app_schema(self.build_app(broker)).to_jsonable()

Expand Down
Loading

0 comments on commit c1a159d

Please sign in to comment.