Completed
Push — main ( 7f5a9f...48eb55 )
by
unknown
14s queued 12s
created

pincer.middleware.payload   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 7
dl 0
loc 15
rs 10
c 0
b 0
f 0

2 Functions

Rating   Name   Duplication   Size   Complexity  
A payload_middleware() 0 3 1
A export() 0 3 1
1
# Copyright Pincer 2021-Present
0 ignored issues
show
introduced by
Missing module docstring
Loading history...
2
# Full MIT License can be found in `LICENSE` at the project root.
3
4
from ..core.dispatch import GatewayDispatch
5
6
7
async def payload_middleware(self, payload: GatewayDispatch):
0 ignored issues
show
Unused Code introduced by
The argument self seems to be unused.
Loading history...
8
    """Invoked when basically anything is received from gateway.."""
9
    return "on_payload", [payload]
10
11
12
def export():
13
    """Export the middleware"""
14
    return payload_middleware
15