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 found a bug, when trying to remove the header of a file which only contains the header (typically __init__.py), I get following error:
File "site-packages/pre_commit_hooks/insert_license.py", line 206, in license_found
if src_file_content[license_header_index + len(license_info.prefixed_license)].strip():
IndexError: list index out of range
I added a -1 in the equation and it fixes the issue. I tried to go a bit further by fixing how license_header_index is computed, but I am afraid I don’t get everything, so I would prefer that you fix it the best way.
Thanks.
The text was updated successfully, but these errors were encountered:
Hi, and thanks for this nice tool!
I found a bug, when trying to remove the header of a file which only contains the header (typically
__init__.py
), I get following error:pre-commit-hooks/pre_commit_hooks/insert_license.py
Line 206 in 296f9eb
I added a
-1
in the equation and it fixes the issue. I tried to go a bit further by fixing howlicense_header_index
is computed, but I am afraid I don’t get everything, so I would prefer that you fix it the best way.Thanks.
The text was updated successfully, but these errors were encountered: