Fixes for bug #55
writer_options{"add_checksum": False} being ignored for Code39 barcodes.
Added class variable to track when the checksum has been added so it can't add twice
Moved the check for checksum to the render function
Set a default value class variable.
Update codex.py #56
srolin/master into main
Seems to make sense to me -- tho I can't see how the checksum got calculated twice. Have you figured out where that happened?
Moving this to the constructor seems more intuitive (since it's an instance attribute, and not a class attribute).
Also, should probably be named add_checksum, since this isn't the default, but the current value.
List comprehension seems redundant here.
Completely agree, not sure how that line got changed.
This was intended to be the default value that gets applied if no checksum value is passed in the options, but yes the constructor would probably be a better place.
No I didn't see an example of it being added twice, but if anyone called the render function twice then it would.
Agreed on list comprehension
render doesn't seem to modify self.code. How does the checksum end up being added twice? It would seem that it's only done in the constructor (or am I missing something?).
renderdoesn't seem to modifyself.code. How does the checksum end up being added twice? It would seem that it's only done in the constructor (or am I missing something?).
This was changed in the first commit. I moved the checksum code from the class constructor to the render function. The second commit was just to address your previous comments. If you look at the combined changes you can see the new render code.
Sorry, I'm not seeing it. 😓
Can you point me to the exact line where this happens? Or maybe a sample code to reproduce the issue? Or a unit test that fails for the bug?
I think perhaps I have not explained the change very well. I am traveling at the moment, but will take some time and fully document the bug, the fix, what code breaks etc. Thanks for your patience.
Hey there! Do you have any update?
- barcode/codex.py
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.
inconsistencies in the API between various barcodes or writers
Automatically merge this PR once CI passes.
Further design discussions and PRs are welcome.
things that need to be documented better
waiting for a reply from the reporter
No due date set.
No dependencies set.
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?