From ea2d86e9a7c8a7f7c9cc9f9e81e21118a8edaec0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=BF=E3=81=A6=E3=82=8B=E3=81=9E?= Date: Thu, 7 Dec 2023 12:38:51 +0900 Subject: [PATCH] =?UTF-8?q?'common=5Fmodule.py'=20=E3=82=92=E6=9B=B4?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common_module.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common_module.py b/common_module.py index e0f8966..7c4c454 100644 --- a/common_module.py +++ b/common_module.py @@ -12,8 +12,8 @@ class CommonModule: @classmethod def index_by_f2c (cls, string: str, index: float) -> int: - i = 0 - work = '' + i: int = 0 + work: str = '' for c in string: work += c if cls.len_by_full (work) > index: @@ -25,7 +25,7 @@ class CommonModule: @classmethod def mid_by_full (cls, string: str, start: float, length: float) -> str: - trimmed_left = string[cls.index_by_f2c (string, start):] + trimmed_left: str = string[cls.index_by_f2c (string, start):] return trimmed_left[:cls.index_by_f2c (trimmed_left, length)]