From ae7d8288330771e04547b0d9c7f0f81018332f84 Mon Sep 17 00:00:00 2001 From: erjemin Date: Mon, 20 Jul 2026 20:35:54 +0300 Subject: [PATCH] =?UTF-8?q?minor:=20=D1=82=D0=B8=D0=BF=D0=B8=D0=B7=D0=B0?= =?UTF-8?q?=D1=86=D0=B8=D1=8F=20=D0=BF=D0=B5=D1=80=D0=B5=D0=BC=D0=B5=D0=BD?= =?UTF-8?q?=D0=BD=D1=8B=D1=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 382b8a9..78bfd45 100644 --- a/main.py +++ b/main.py @@ -3,7 +3,7 @@ import sys from PIL import Image -def encode_to_base36(num): +def encode_to_base36(num: int) -> str: """Кодирует число в base-36: 0-9, A-Z, a-z""" if num < 0: raise ValueError("Number must be non-negative") @@ -19,7 +19,13 @@ def encode_to_base36(num): return ''.join(reversed(result)) -def generate_halftone_svg(image_path, output_path, cols=80, max_radius=8, animation_variants=12): +def generate_halftone_svg( + image_path: str, + output_path: str, + cols: int = 80, + max_radius: int = 8, + animation_variants: int = 12): + '''Генерирует SVG с полутоновым эффектом из изображения.''' import random from collections import defaultdict