<commit_before>from math import pi

from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import QInputDialog, QDialog

from Business.SketchActions import get_create_keypoint, create_line, add_sketch_instance_to_sketch, create_nurbs_edge, add_arc, \
	create_circle
from GUI.Widgets.SimpleDialogs import AddArcDialog
from GUI.init import plugin_initializers

from GUI.Ribbon.RibbonButton import RibbonButton


class SketchLineDraw():
	def __init__(self, main_window):
		self._main_window = main_window
		self._add_line_action = None
		self._add_spline_action = None
		self._add_sketch_instance_action = None
		self._add_arc_action = None
		self._add_circle_action = None
		self._states = main_window.states
		self._sketch_editor_view = main_window.sketch_editor_view
		self._sketch_editor_view.add_mouse_press_event_handler(self.on_mouse_press)
		# self._sketch_editor_view.add_mouse_move_event_handler(self.on_mouse_move)
		self._sketch_editor_view.add_escape_event_handler(self.on_escape)
		self._states.draw_line_edge = False
		self._states.add_sketch_instance = False
		self._states.draw_spline_edge = False
		self._states.draw_arc_edge = False
		self._states.draw_circle_edge = False
		self._last_kp = None
		self.init_ribbon()

	def init_ribbon(self):
		self._add_line_action = self._main_window.add_action("Add\nline",
																												 "addline",<commit_msg>More instancing and nested parametry implementations.<commit_after>from math import pi

from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import QInputDialog, QDialog

from Business.SketchActions import get_create_keypoint, create_line, add_sketch_instance_to_sketch, create_nurbs_edge, add_arc, \
	create_circle
from GUI.Widgets.SimpleDialogs import AddArcDialog
from GUI.init import plugin_initializers

from GUI.Ribbon.RibbonButton import RibbonButton


class SketchLineDraw():
	def __init__(self, main_window):
		self._main_window = main_window
		self._add_line_action = None
		self._add_spline_action = None
		self._add_sketch_instance_action = None
		self._add_arc_action = None
		self._add_circle_action = None
		self._states = main_window.states
		self._sketch_editor_view = main_window.sketch_editor_view
		self._sketch_editor_view.add_mouse_press_event_handler(self.on_mouse_press)
		# self._sketch_editor_view.add_mouse_move_event_handler(self.on_mouse_move)
		self._sketch_editor_view.add_escape_event_handler(self.on_escape)
		self._states.draw_line_edge = False
		self._states.add_sketch_instance = False
		self._states.draw_spline_edge = False
		self._states.draw_arc_edge = False
		self._states.draw_circle_edge = False
		self._last_kp = None
		self.init_ribbon()


	def init_ribbon(self):
		self._add_line_action = self._main_window.add_action("Add\nline",
																												 "addline",
{'fraction_non_alphanumeric': 0.06791232482932087, 'fraction_numerical': 0.001437297879985627, 'mean_word_length': 5.444444444444445, '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': '7364420', 'n_tokens_mistral': 988, 'n_tokens_neox': 927, 'n_words': 156}