SlavikMIPT / tgcloud

Opensource Telegram based cloud storage
https://dev.tgcloud.xyz
Apache License 2.0
558 stars 83 forks source link

Sourcery refactored master branch #29

Open sourcery-ai[bot] opened 4 years ago

sourcery-ai[bot] commented 4 years ago

Branch master refactored by Sourcery.

If you're happy with these changes, merge this Pull Request using the Squash and merge strategy.

See our documentation here.

Run Sourcery locally

Reduce the feedback loop during development by using the Sourcery editor plugin:

Review changes via command line

To manually merge these changes, make sure you're on the master branch, then run:

git fetch origin sourcery/master
git merge --ff-only FETCH_HEAD
git reset HEAD^
sourcery-ai[bot] commented 4 years ago

Sourcery Code Quality Report (beta)

✅ Merging this PR will increase code quality in the affected files by 0.02 out of 10.

Before After Change
Quality 8.42 8.44 0.02
Complexity 4.18 4.03 -0.16
Method Length 54.91 54.69 -0.22
Lines 1679 1679 0
Changed files Quality Before Quality After Quality Change
download_service.py 8.47 8.49 0.02 ⬆️
telegram_client_x.py 7.12 7.12 0.0 ⬆️
dedupfs/dedupfs.py 8.42 8.43 0.01 ⬆️
dedupfs/fuse.py 8.68 8.7 0.02 ⬆️

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

File Function Quality Recommendation
telegram_client_x.py TelegramClientX.upload_file 1.17 Split out functionality. Reduce complexity
telegram_client_x.py TelegramClientX.download_file 1.61 Split out functionality. Reduce complexity
dedupfs/fuse.py feature_needs 2.97 Split out functionality
dedupfs/dedupfs.py DedupFS.__write_blocks 4.18 Split out functionality
dedupfs/fuse.py feature_needs.resolve 4.6 Split out functionality

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!

Let us know what you think of it via email or our Gitter!