Skip to content

Conversation

@felipediel
Copy link
Collaborator

This helps us to avoid global, which is usually a code smell.

@felipediel felipediel merged commit 55ea00f 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)
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.

1 participant