GithubHelp home page GithubHelp logo

koviubi56 / p2sn Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 184 KB

Peer to peer socket network

License: GNU Lesser General Public License v3.0

Python 100.00%
python python-3 python-3-10 python-3-8 python-3-9 python-library python3 python3-library python38 python39

p2sn's Introduction

p2sn's People

Contributors

dependabot[bot] avatar koviubi56 avatar pre-commit-ci[bot] avatar sourcery-ai[bot] avatar

Stargazers

 avatar

Watchers

 avatar

p2sn's Issues

Improve code quality

Sourcery Code Quality Report

❌  Merging this PR will decrease code quality in the affected files by 2.19%.

Quality metrics Before After Change
Complexity 4.76 ⭐ 5.77 ⭐ 1.01 πŸ‘Ž
Method Length 63.96 πŸ™‚ 63.31 πŸ™‚ -0.65 πŸ‘
Working memory 7.73 πŸ™‚ 8.02 πŸ™‚ 0.29 πŸ‘Ž
Quality 67.69% πŸ™‚ 65.50% πŸ™‚ -2.19% πŸ‘Ž
Other metrics Before After Change
Lines 594 692 98
Changed files Quality Before Quality After Quality Change
src/p2sn/init.py 65.59% πŸ™‚ 63.52% πŸ™‚ -2.07% πŸ‘Ž
tests/test_p2sn.py 94.41% ⭐ 93.68% ⭐ -0.73% πŸ‘Ž

Here are some functions in these files that still need a tune-up:

File Function Complexity Length Working Memory Quality Recommendation
src/p2sn/init.py Server._handle 18 πŸ™‚ 191 😞 13 😞 37.48% 😞 Try splitting into smaller methods. Extract out complex expressions
src/p2sn/init.py Server._handle_pubkey 5 ⭐ 227 β›” 12 😞 47.97% 😞 Try splitting into smaller methods. Extract out complex expressions
src/p2sn/init.py Client.init 5 ⭐ 291 β›” 7 πŸ™‚ 55.17% πŸ™‚ Try splitting into smaller methods
src/p2sn/init.py Request.__init__ 10 πŸ™‚ 134 😞 9 πŸ™‚ 57.04% πŸ™‚ Try splitting into smaller methods
src/p2sn/init.py Server._recv_msg 7 ⭐ 137 😞 9 πŸ™‚ 59.51% πŸ™‚ Try splitting into smaller methods

Legend and Explanation

The emojis denote the absolute quality of the code:

  • ⭐ excellent
  • πŸ™‚ good
  • 😞 poor
  • β›” very poor

The πŸ‘ and πŸ‘Ž indicate whether the quality has improved or gotten worse with this pull request.


Please see our documentation here for details on how these metrics are calculated.

We are actively working on this report - lots more documentation and extra metrics to come!

Help us improve this quality report!

Originally posted by @sourcery-ai[bot] in #5 (comment)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.