Starting in version 1.96, cloc will output an empty JSON object ({}) instead of nothing if no files are detected. This results in a KeyError on empty repositories instead of a json.decoder.JSONDecodeError. Since this indicates a potentially different issue it is handled in its own escept block. I also had to reformat an otherwise unrelated file to comply with black.
Starting in version 1.96, cloc will output an empty JSON object (
{}
) instead of nothing if no files are detected. This results in aKeyError
on empty repositories instead of ajson.decoder.JSONDecodeError
. Since this indicates a potentially different issue it is handled in its ownescept
block. I also had to reformat an otherwise unrelated file to comply with black.