<commit_before>import cv2
from PictureStorage import PictureStorage
from Settings import Settings


class GUI:

    def __init__(self, calculator, picture_storage: PictureStorage, settings: Settings):
        self.calculator = calculator
        self.picture_storage = picture_storage
        self.settings = settings
        self.section_count = 15
        self.default_button_hight = 2.5

    def paint_term(self, number1, operator, number2, delete):
        image = self.picture_storage.get_picture(self.picture_storage.GUI_BGR).copy()
        hight = len(image)
        width = len(image[0])
        x = width / 2
        y = hight / self.section_count * self.default_button_hight

        if number1 is None and operator is None and number2 is None and delete is None:
            string = ""

        if number1 is not None and operator is None and number2 is None and delete is not None:
            number1 = None
            string = ""

        if number1 is not None and operator is None and number2 is None and delete is None:
            string = str(number1)

        if number1 is not None and operator is not None and number2 is None and delete is not None:
            operator = None
            string = str(number1)
<commit_msg>corrections<commit_after>import cv2
from PictureStorage import PictureStorage
from Settings import Settings


class GUI:

    def __init__(self, calculator, picture_storage: PictureStorage, settings: Settings):
        self.calculator = calculator
        self.picture_storage = picture_storage
        self.settings = settings
        self.section_count = 15
        self.default_button_hight = 2.5

    def paint_term(self, number1=None, operator=None, number2=None, delete=None):
        image = self.picture_storage.get_picture(self.picture_storage.GUI_BGR).copy()
        hight = len(image)
        width = len(image[0])
        x = width / 2
        y = hight / self.section_count * self.default_button_hight

        if number1 is None and operator is None and number2 is None and delete is None:
            string = ""

        if number1 is not None and operator is None and number2 is None and delete is not None:
            number1 = None
            string = ""

        if number1 is not None and operator is None and number2 is None and delete is None:
            string = str(number1)

        if number1 is not None and operator is not None and number2 is None and delete is not None:
            operator = None
            string = str(number1)

{'fraction_non_alphanumeric': 0.059665871121718374, 'fraction_numerical': 0.015910898965791568, 'mean_word_length': 2.449931412894376, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6127380', 'n_tokens_mistral': 683, 'n_tokens_neox': 651, 'n_words': 256}