Skip to content

Commit

Permalink
lint: fix specification mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
Lancetnik committed Jan 9, 2025
1 parent 95195fa commit d03b62d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions faststream/specification/asyncapi/v2_6_0/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,25 +150,25 @@ def get_broker_channels(
channels = {}

for h in broker._subscribers:
for key, channel in h.schema().items():
for key, sub in h.schema().items():
if key in channels:
warnings.warn(
f"Overwrite channel handler, channels have the same names: `{key}`",
RuntimeWarning,
stacklevel=1,
)
channels[key] = Channel.from_sub(channel)
channels[key] = Channel.from_sub(sub)

for p in broker._publishers:
for key, channel in p.schema().items():
for key, pub in p.schema().items():
if key in channels:
warnings.warn(
f"Overwrite channel handler, channels have the same names: `{key}`",
RuntimeWarning,
stacklevel=1,
)

channels[key] = Channel.from_pub(channel)
channels[key] = Channel.from_pub(pub)

return channels

Expand Down

0 comments on commit d03b62d

Please sign in to comment.