Skip to content
New issue

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

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

Already on GitHub? # to your account

Segregate CRC16.get_table() from CRC16.calculate() #567

Merged
merged 1 commit into from
Apr 1, 2021

Conversation

felipediel
Copy link
Collaborator

@felipediel felipediel commented Apr 1, 2021

Split CRC16.calculate() in two to make it more reusable and avoid R0903 (too-few-public-methods).

@felipediel felipediel merged commit 2b3a8fb into mjg59:dev Apr 1, 2021
felipediel added a commit to felipediel/python-broadlink that referenced this pull request Apr 26, 2021
felipediel added a commit to felipediel/python-broadlink that referenced this pull request Sep 12, 2021
* Rename calculate_crc16 to crc16

* Apply PEP-8 naming conventions

* Remove unnecessary import

* Accept any sequence type

* Remove unnecessary conversions

* Expose polynomial and initial value as kwargs

* Remove unnecessary bitwise operations

* Store the CRC-16 table for performance

* Add missing type hints

* Update docstring

* General improvements

Encapsulate crc16() to avoid global (mjg59#566)

Segregate CRC16.get_table() from CRC16.calculate() (mjg59#567)
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant