bazingagin/npc_gzip

Syntax error in compressors.py: unterminated triple quote

Closed this issue · 1 comments

    def get_bits_per_char(self, original_fn: str) -> float:
        """
        Returns the compressed size of the original function
        in bits.

"""Test Compressors"""

This bug appears to have been introduced in 404253f. The problem is not limited to closing """ quotes being missing. The implementation of get_bits_per_char has also gone away, as shown by this fragment of the diff:

-        """
-        with open(original_fn) as fo:
-            data = fo.read()
-            compressed_str = self.compressor.compress(data.encode("utf-8"))
-            return len(compressed_str) * 8 / len(data)

I've proposed a fix in #21 (for this issue and another one of apparently similar origin, #20).