-
-
Notifications
You must be signed in to change notification settings - Fork 90
Handle misencoded license text files graceful. #884
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
Conversation
jkowalleck
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the current implementation seams utterly complex.
please refactor it.
Signed-off-by: Michael Schlenker <michael.schlenker@contact-software.com>
Signed-off-by: Michael Schlenker <michael.schlenker@contact-software.com>
Signed-off-by: Michael Schlenker <michael.schlenker@contact-software.com>
Signed-off-by: Michael Schlenker <michael.schlenker@contact-software.com>
Signed-off-by: Michael Schlenker <michael.schlenker@contact-software.com>
A good chunk of the complexity stems from the original code in pep639.py, which i shifted around a little. |
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
|
Thanks. Looks much cleaner. I found it somewhat hard to figure out how to add good tests in the first place. Is there some documentation about the test concept/how to add good tests? As there is already quite a bit of scaffolding and infrastructure present, but not entirely obvious at first. |
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
fix: try to detect licensetexts, or pass silently
|
Something is off on windows. |
will try to fix this |
Signed-off-by: Michael Schlenker <michael.schlenker@contact-software.com>
This reverts commit 3be391d.
This handles #868
If a license file is not decodeable as UTF-8, it uses the fallback to io2str using chardet to determine the encoding will be tried.
It also adds some tests to exercise the code: