Refactor the following code according to this: Microsoft Windows [Version…
- User
Refactor the following code according to this: Microsoft Windows [Version 10.0.22631.4169] (c) Microsoft Corporation. Alle Rechte vorbehalten.
D:\Bilder\Python>pylint test.py ************* Module test test.py:50:0: C0301: Line too long (111/100) (line-too-long) test.py:219:0: C0301: Line too long (116/100) (line-too-long) test.py:229:0: C0301: Line too long (101/100) (line-too-long) test.py:382:0: C0301: Line too long (118/100) (line-too-long) test.py:468:0: C0301: Line too long (102/100) (line-too-long) test.py:484:0: C0301: Line too long (110/100) (line-too-long) test.py:528:0: C0301: Line too long (102/100) (line-too-long) test.py:596:0: C0301: Line too long (102/100) (line-too-long) test.py:603:0: C0301: Line too long (101/100) (line-too-long) test.py:617:0: C0301: Line too long (115/100) (line-too-long) test.py:636:0: C0301: Line too long (136/100) (line-too-long) test.py:663:0: C0301: Line too long (101/100) (line-too-long) test.py:689:0: C0301: Line too long (101/100) (line-too-long) test.py:700:0: C0301: Line too long (118/100) (line-too-long) test.py:717:0: C0301: Line too long (105/100) (line-too-long) test.py:782:0: C0301: Line too long (120/100) (line-too-long) test.py:783:0: C0301: Line too long (124/100) (line-too-long) test.py:785:0: C0301: Line too long (168/100) (line-too-long) test.py:789:0: C0301: Line too long (109/100) (line-too-long) test.py:795:0: C0301: Line too long (123/100) (line-too-long) test.py:803:0: C0301: Line too long (126/100) (line-too-long) test.py:807:0: C0301: Line too long (107/100) (line-too-long) test.py:812:0: C0301: Line too long (143/100) (line-too-long) test.py:815:0: C0301: Line too long (132/100) (line-too-long) test.py:824:0: C0301: Line too long (113/100) (line-too-long) test.py:825:0: C0301: Line too long (105/100) (line-too-long) test.py:852:0: C0301: Line too long (129/100) (line-too-long) test.py:856:0: C0301: Line too long (117/100) (line-too-long) test.py:876:0: C0301: Line too long (134/100) (line-too-long) test.py:888:0: C0301: Line too long (103/100) (line-too-long) test.py:908:0: C0301: Line too long (103/100) (line-too-long) test.py:959:0: C0301: Line too long (113/100) (line-too-long) test.py:960:0: C0301: Line too long (105/100) (line-too-long) test.py:961:0: C0301: Line too long (120/100) (line-too-long) test.py:1014:0: C0301: Line too long (118/100) (line-too-long) test.py:1:0: C0302: Too many lines in module (1068/1000) (too-many-lines) test.py:1:0: C0114: Missing module docstring (missing-module-docstring) test.py:102:8: E0606: Possibly using variable 'shared_state' before assignment (possibly-used-before-assignment) test.py:130:8: E0606: Possibly using variable 'image_processor' before assignment (possibly-used-before-assignment) test.py:132:8: E0606: Possibly using variable 'app' before assignment (possibly-used-before-assignment) test.py:118:12: W0612: Unused variable 'total_files' (unused-variable) test.py:181:11: W0718: Catching too general exception Exception (broad-exception-caught) test.py:253:23: W0718: Catching too general exception Exception (broad-exception-caught) test.py:327:19: W0621: Redefining name 'image_processor' from outer scope (line 1066) (redefined-outer-name) test.py:339:33: W0612: Unused variable 'temp_folder' (unused-variable) test.py:356:8: W0612: Unused variable 'adjusted' (unused-variable) test.py:363:22: W0621: Redefining name 'image_processor' from outer scope (line 1066) (redefined-outer-name) test.py:382:75: W0621: Redefining name 'image_processor' from outer scope (line 1066) (redefined-outer-name) test.py:458:15: W0718: Catching too general exception Exception (broad-exception-caught) test.py:442:50: W1510: 'subprocess.run' used without explicitly defining the value for 'check'. (subprocess-run-check) test.py:468:59: W0621: Redefining name 'image_processor' from outer scope (line 1066) (redefined-outer-name) test.py:468:38: W0613: Unused argument 'output_folder' (unused-argument) test.py:572:0: R0913: Too many arguments (7/5) (too-many-arguments) test.py:572:0: R0917: Too many positional arguments (7/5) (too-many-positional-arguments) test.py:576:4: W0621: Redefining name 'image_processor' from outer scope (line 1066) (redefined-outer-name) test.py:617:33: W0621: Redefining name 'image_processor' from outer scope (line 1066) (redefined-outer-name) test.py:638:0: R0913: Too many arguments (6/5) (too-many-arguments) test.py:638:0: R0917: Too many positional arguments (6/5) (too-many-positional-arguments) test.py:641:4: W0621: Redefining name 'image_processor' from outer scope (line 1066) (redefined-outer-name) test.py:655:8: R1705: Unnecessary "else" after "return", remove the "else" and de-indent the code inside it (no-else-return) test.py:683:41: W0613: Unused argument 'output_folder' (unused-argument) test.py:729:0: C0115: Missing class docstring (missing-class-docstring) test.py:762:8: C0103: Attribute name "RESIZE_MODE" doesn't conform to snake_case naming style (invalid-name) test.py:763:8: C0103: Attribute name "RESIZE_WIDTH" doesn't conform to snake_case naming style (invalid-name) test.py:764:8: C0103: Attribute name "RESIZE_HEIGHT" doesn't conform to snake_case naming style (invalid-name) test.py:765:8: C0103: Attribute name "RESIZE_SIDE" doesn't conform to snake_case naming style (invalid-name) test.py:766:8: C0103: Attribute name "RESIZE_FORMAT" doesn't conform to snake_case naming style (invalid-name) test.py:729:0: R0902: Too many instance attributes (26/7) (too-many-instance-attributes) test.py:738:4: C0116: Missing function or method docstring (missing-function-docstring) test.py:745:4: C0116: Missing function or method docstring (missing-function-docstring) test.py:748:15: W0718: Catching too general exception Exception (broad-exception-caught) test.py:751:4: C0116: Missing function or method docstring (missing-function-docstring) test.py:761:4: C0116: Missing function or method docstring (missing-function-docstring) test.py:770:4: C0116: Missing function or method docstring (missing-function-docstring) test.py:781:4: C0116: Missing function or method docstring (missing-function-docstring) test.py:785:4: C0116: Missing function or method docstring (missing-function-docstring) test.py:785:4: R0913: Too many arguments (6/5) (too-many-arguments) test.py:785:4: R0917: Too many positional arguments (6/5) (too-many-positional-arguments) test.py:799:4: C0116: Missing function or method docstring (missing-function-docstring) test.py:810:4: C0116: Missing function or method docstring (missing-function-docstring) test.py:831:4: C0116: Missing function or method docstring (missing-function-docstring) test.py:838:4: C0116: Missing function or method docstring (missing-function-docstring) test.py:855:4: C0116: Missing function or method docstring (missing-function-docstring) test.py:859:4: C0116: Missing function or method docstring (missing-function-docstring) test.py:872:4: C0116: Missing function or method docstring (missing-function-docstring) test.py:887:4: C0116: Missing function or method docstring (missing-function-docstring) test.py:892:4: C0116: Missing function or method docstring (missing-function-docstring) test.py:895:4: C0116: Missing function or method docstring (missing-function-docstring) test.py:899:4: C0116: Missing function or method docstring (missing-function-docstring) test.py:904:4: C0116: Missing function or method docstring (missing-function-docstring) test.py:907:4: C0116: Missing function or method docstring (missing-function-docstring) test.py:910:4: C0116: Missing function or method docstring (missing-function-docstring) test.py:918:4: C0116: Missing function or method docstring (missing-function-docstring) test.py:921:4: C0116: Missing function or method docstring (missing-function-docstring) test.py:924:4: C0116: Missing function or method docstring (missing-function-docstring) test.py:928:4: C0116: Missing function or method docstring (missing-function-docstring) test.py:932:4: C0116: Missing function or method docstring (missing-function-docstring) test.py:946:4: C0116: Missing function or method docstring (missing-function-docstring) test.py:967:4: C0116: Missing function or method docstring (missing-function-docstring) test.py:973:4: C0116: Missing function or method docstring (missing-function-docstring) test.py:973:36: W0613: Unused argument 'event' (unused-argument) test.py:994:4: C0116: Missing function or method docstring (missing-function-docstring) test.py:1002:4: C0116: Missing function or method docstring (missing-function-docstring) test.py:1008:16: W0702: No exception type(s) specified (bare-except) test.py:1013:4: C0116: Missing function or method docstring (missing-function-docstring) test.py:1020:4: C0116: Missing function or method docstring (missing-function-docstring) test.py:1032:4: C0116: Missing function or method docstring (missing-function-docstring) test.py:1034:8: W0612: Unused variable 'end_time' (unused-variable) test.py:1058:4: C0116: Missing function or method docstring (missing-function-docstring) test.py:753:8: W0201: Attribute 'style' defined outside (attribute-defined-outside-init) test.py:807:8: W0201: Attribute 'start_button' defined outside (attribute-defined-outside-init) test.py:819:8: W0201: Attribute 'width_label' defined outside (attribute-defined-outside-init) test.py:820:8: W0201: Attribute 'width_entry' defined outside (attribute-defined-outside-init) test.py:821:8: W0201: Attribute 'height_label' defined outside (attribute-defined-outside-init) test.py:822:8: W0201: Attribute 'height_entry' defined outside (attribute-defined-outside-init) test.py:823:8: W0201: Attribute 'maintain_aspect_ratio' defined outside (attribute-defined-outside-init) test.py:824:8: W0201: Attribute 'maintain_aspect_ratio_label' defined outside (attribute-defined-outside-init) test.py:825:8: W0201: Attribute 'maintain_aspect_ratio_checkbox' defined outside (attribute-defined-outside-init) test.py:826:8: W0201: Attribute 'side_label' defined outside (attribute-defined-outside-init) test.py:827:8: W0201: Attribute 'side_entry' defined outside (attribute-defined-outside-init) test.py:856:8: W0201: Attribute 'stop_button' defined outside (attribute-defined-outside-init) test.py:863:8: W0201: Attribute 'notebook' defined outside (attribute-defined-outside-init) test.py:866:8: W0201: Attribute 'text_areas' defined outside (attribute-defined-outside-init) test.py:888:8: W0201: Attribute 'progress' defined outside (attribute-defined-outside-init) test.py:969:8: W0201: Attribute 'stopped_by_user' defined outside (attribute-defined-outside-init) test.py:729:0: R0904: Too many public methods (35/20) (too-many-public-methods) test.py:16:0: W0611: Unused Iterable imported from typing (unused-import) Python 3.12 Code: import ctypes import logging import os import shutil import subprocess import threading import time import tkinter as tk from collections import defaultdict from concurrent.futures import ThreadPoolExecutor, Future from contextlib import contextmanager from pathlib import Path from queue import Queue from tkinter import filedialog from tkinter import ttk from typing import Any, Callable, Optional, Sequence, Union, Generator, cast
- Assistant