Treat SQLite DB and mostly binaries as binaries #43 #44
Treat SQLite DB and mostly binaries as binaries #43 #44pydanny merged 2 commits intobinaryornot:masterfrom
Conversation
|
@audreyr BTW do you need help with the maintenance of this project? |
|
Let me revert the Appevyor config changes. :| |
|
@pombredanne Thank you for this effort so far! Work has given me the chance to support this and other Cookiecutter-related projects going forward. Any help you give toward maintaining the project will be greatly appreciated. |
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
a509548 to
f1584e6
Compare
| nontext_ratio2 = float(len(high_chars)) / float(len(bytes_to_check)) | ||
| logger.debug('nontext_ratio2: %(nontext_ratio2)r', locals()) | ||
|
|
||
| if nontext_ratio1 > 0.90 and nontext_ratio2 > 0.90: |
There was a problem hiding this comment.
The rationale is that if this is mostly non-ascii (e.g non-printable low and high bytes) then this is treated as a binary.
|
@pydanny re:
Sure thing! binaryornot is used in scancode-toolkit which is a somewhat popular open source license and copyright scanner so it sees a lot of files. There are some weirdness I noticed recently and I will likely come with a few more tweaks |
|
@pydanny do you mind to tag and push a release to Pypi? |
This PR fixes #43
Signed-off-by: Philippe Ombredanne pombredanne@nexb.com