Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: TypeError: unsupported operand type(s) for <<: 'float' and 'int' #133

Merged
merged 2 commits into from
Jun 16, 2022

Conversation

sfwn
Copy link
Contributor

@sfwn sfwn commented May 3, 2022

see: #132

Build from source code and tested success.

image

@jerrymakesjelly
Copy link
Owner

Good, but there’s still a small problem, that is, the upload and download condition can’t handle decimals correctly.

Therefore, I would like to change

self._downloads = downloads << 30

to

self._downloads = downloads * (1 << 30)

and the same for the upload condition.

@sfwn
Copy link
Contributor Author

sfwn commented May 8, 2022

yes, I have considered decimal issue but I have no base of python :P
I tested new format and it works on my machine.

image

image

@jerrymakesjelly
Copy link
Owner

LGTM. Thank you for your contribution!

@jerrymakesjelly jerrymakesjelly changed the base branch from master to dev June 16, 2022 10:46
@jerrymakesjelly jerrymakesjelly merged commit e010d0a into jerrymakesjelly:dev Jun 16, 2022
jerrymakesjelly added a commit that referenced this pull request Jun 19, 2022
@jerrymakesjelly jerrymakesjelly mentioned this pull request Jun 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants