1
0
Fork 0
mirror of https://github.com/suchmememanyskill/TegraExplorer.git synced 2024-11-26 13:52:06 +00:00

missing ) goes brrrr

this isnt even a change to code i literally just forgot a ) at the end
of a string
This commit is contained in:
bleck9999 2021-08-28 21:35:43 +01:00
parent e4747b2344
commit 90ae8f3176
No known key found for this signature in database
GPG key ID: D0CA0C41DB616843

View file

@ -1,6 +1,6 @@
# Copyright (c) 2021 bleck9999 # Copyright (c) 2021 bleck9999
# https://github.com/bleck9999/ts-minifier # https://github.com/bleck9999/ts-minifier
# Version: 1095d14a # Version: c1b874bb
import argparse import argparse
import itertools import itertools
@ -181,15 +181,15 @@ def minify(script: Code, userobjects, usages):
userobjects[minName] = "TRN" userobjects[minName] = "TRN"
break break
if not minName: if not minName:
print(f"{'Function' if otype == 'func' else 'Variable'} name {uo} could be shortened but no available " print(f"{'Function' if otype == 'func' else 'Variable'} name {uo} could be shortened but "
f"names found (would save {uses} bytes)") f"no available names found (would save {uses} bytes)")
continue continue
# we assume that nobody is insane enough to exhaust all *2,808* 2 character names, # we assume that nobody is insane enough to exhaust all *2,808* 2 character names,
# instead that uo is len 2 and all the 1 character names are in use (because of that we dont multiply # instead that uo is len 2 and all the 1 character names are in use (because of that we dont multiply
# uses by anything as multiplying by a difference of 1 would be redundant) # uses by anything as multiplying by a difference of 1 would be redundant)
if not auto_replace: if not auto_replace:
print(f"{'Function' if otype == 'func' else 'Variable'} name {uo} could be shortened ({uo}->{minName}, " print(f"{'Function' if otype == 'func' else 'Variable'} name {uo} could be shortened ({uo}->{minName}, "
f"would save {uses*(uolen - len(minName))} bytes") f"would save {uses*(uolen - len(minName))} bytes)")
continue continue
else: else:
print(f"Renaming {'Function' if otype == 'func' else 'Variable'} {uo} to {minName} " print(f"Renaming {'Function' if otype == 'func' else 'Variable'} {uo} to {minName} "