You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a nice suggestion to remove the install requirements of this project: Remove the dependency on chardet.
chardet is only used in one place and there we could check if it's installed. If not, fall back to chardet.
What do you think? I'm happy to create a PR
The text was updated successfully, but these errors were encountered:
The problem is that without chardet we basically have to assume the files are ascii or utf-8 encoded.
Which... ill admit... is probably fine for the overwhelming majority of users. However, I have encountered latin-1 and other encodings.
I think to really make the dependency optional I would want the following
Solid error message saying something along the lines "Hey, this source file does not seem to be ascii or utf-8. You can install chardet and we can guess it"
a command line option/config to specify a list of source encodings to try (defaulting to just utf-8). Because quite frankly, this would be a better option than chardet for anyone who knows they have non utf-8 source. I think it would have to be a list since its possible to have multiple encodings (technically diff cover does if you include the test fixtures :-P)
I have a nice suggestion to remove the install requirements of this project: Remove the dependency on chardet.
chardet is only used in one place and there we could check if it's installed. If not, fall back to chardet.
What do you think? I'm happy to create a PR
The text was updated successfully, but these errors were encountered: