I'm using this code in a project and while running the linter with type checking enabled (Pylint) I found what look like an error in the decoding of the image size of the JPEG variant here:
More specifically, if the if branch at line 156 is not triggered, the variables h and w are not assigned any value. Thus, line 164 and 165 fails and the image size cannot be computed. Is there something missing in the else branch?
I'm using this code in a project and while running the linter with type checking enabled (Pylint) I found what look like an error in the decoding of the image size of the JPEG variant here:
https://github.com/scardine/image_size/blob/fb25377f42fc6c90c280462a87a41cf20cc2ac0e/get_image_size.py#L144-L171
More specifically, if the if branch at line 156 is not triggered, the variables
h
andw
are not assigned any value. Thus, line 164 and 165 fails and the image size cannot be computed. Is there something missing in the else branch?