dapper91 / pjrpc

python json-rpc client/server without boilerplate
https://pjrpc.readthedocs.io
The Unlicense
30 stars 3 forks source link

mypy: Type aliases for middlewares and update examples/middlewares.py #79

Closed bernhardkaindl closed 2 years ago

bernhardkaindl commented 2 years ago

Add type annotations for annotating RPC server middleware classes.

The 1st commit is submitted as #78 (fixes installing the test dependencies in make init for make test)

codecov-commenter commented 2 years ago

Codecov Report

Merging #79 (743adad) into dev (68d17db) will increase coverage by 0.08%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##              dev      #79      +/-   ##
==========================================
+ Coverage   78.71%   78.79%   +0.08%     
==========================================
  Files          40       40              
  Lines        2584     2594      +10     
==========================================
+ Hits         2034     2044      +10     
  Misses        550      550              
Flag Coverage Δ
unittests 78.79% <100.00%> (+0.08%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pjrpc/server/typedefs.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 68d17db...743adad. Read the comment docs.

bernhardkaindl commented 2 years ago

@dapper91 This adds mypy support for writing middlewares and updates the example code.