1
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp synced 2025-01-31 04:22:25 +01:00

Fix ruff checks

This commit is contained in:
Patrick Robertson 2025-01-17 12:15:46 +01:00
parent 68c034ba81
commit 3b0a867b77

View file

@ -1344,14 +1344,14 @@ class TwitterIE(TwitterBaseIE):
# Convert to base 36
base_36 = ''
while result >= 1:
base_36 = "0123456789abcdefghijklmnopqrstuvwxyz"[int(result % 36)] + base_36
base_36 = '0123456789abcdefghijklmnopqrstuvwxyz'[int(result % 36)] + base_36
result = math.floor(result / 36)
# Append fractional part in base 36
while fractional_part > 0 and len(base_36) < 11: # Limit to avoid infinite loop
fractional_part *= 36
digit = int(fractional_part)
base_36 += "0123456789abcdefghijklmnopqrstuvwxyz"[digit]
base_36 += '0123456789abcdefghijklmnopqrstuvwxyz'[digit]
fractional_part -= digit
# Remove leading zeros and dots