-
Notifications
You must be signed in to change notification settings - Fork 205
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 some non-byteclean drivers #807
base: master
Are you sure you want to change the base?
Conversation
kk7ds
commented
Nov 8, 2023
- bitwise: Support string-to-char[] in some cases
- boblov_x3plus: Fix raw bytestring handling
- leixen: Fix raw bytestring handling
- puxing: Fix raw bytestring handling
- tk8102: Fix raw bytestring handling
- vx2,3,7: Fix raw bytestring handling
- vx8: Fix raw bytestring handling (et al)
This makes bitwise allow converting strings to char[] without encoding if the string can be encoded purely as ASCII. Drivers should really be pre-encoding strings, which this will also natively allow, but a LOT of drivers will need to change for this to be a hard requirement.
This driver also hasn't been converted or tested for python3. However, it is pretty simple so this change also includes prospective byte-clean conversions which may make it just work.
This also fixes some other python3isms that apparently never got addressed originally.
54ff4c5
to
330720b
Compare
Now that CHIRP is python3 only, would you be opposed on adding typing information to the base/core functions where possible? something like going from When I first started looking at python3 code (coming from python2) I hated it, but having the hints make using an IDE much more productive. |
Yeah I dunno. I appreciate the type hints in my editor as well, but I hate them in my code :( Python was supposed to be duck typed from the beginning, and so type annotations especially ("either this or that completely different type") is pretty silly. But, lots of work to do on all the drivers before we get squared away anyway. |