<commit_before>from PyQt5 import Qt
from bs4 import BeautifulSoup
from urllib.request import build_opener, HTTPCookieProcessor, HTTPError
from http import cookiejar
import zipfile
import defines
import os
import re
from _thread import start_new_thread
from threading import Lock

class CheckDlg(Qt.QDialog):
	checkFinished = Qt.pyqtSignal(Qt.QVariant, bool, Qt.QVariant)
	closeSignal = Qt.pyqtSignal()
	def __init__(self, parent, addons):
		super(CheckDlg, self).__init__(parent)
		settings = Qt.QSettings()
		layout = Qt.QVBoxLayout(self)
		if len(addons) == 1:
			layout.addWidget(Qt.QLabel(self.tr("Verifying if the addon needs an update...")))
		else:
			layout.addWidget(Qt.QLabel(self.tr("Verifying which addon needs an update...")))
		self.progress = Qt.QProgressBar(self)
		self.progress.setRange(0, len(addons))
		self.progress.setValue(0)
		self.progress.setFormat("%v / %m | %p%")
		layout.addWidget(self.progress)
		self.cancelButton = Qt.QPushButton(self.tr("Cancel"), self)
		self.cancelButton.clicked.connect(self.onCancel)
		layout.addWidget(self.cancelButton)
		self.addons = addons
		self.maxThreads = int(settings.value(defines.LCURSE_MAXTHREADS_KEY, defines.LCURSE_MAXTHREADS_DEFAULT))
		self.sem = Qt.QSemaphore(self.maxThreads)
<commit_msg>make cancel button smaller and align centered<commit_after>from PyQt5 import Qt
from bs4 import BeautifulSoup
from urllib.request import build_opener, HTTPCookieProcessor, HTTPError
from http import cookiejar
import zipfile
import defines
import os
import re
from _thread import start_new_thread
from threading import Lock

class CheckDlg(Qt.QDialog):
	checkFinished = Qt.pyqtSignal(Qt.QVariant, bool, Qt.QVariant)
	closeSignal = Qt.pyqtSignal()
	def __init__(self, parent, addons):
		super(CheckDlg, self).__init__(parent)
		settings = Qt.QSettings()
		layout = Qt.QVBoxLayout(self)
		if len(addons) == 1:
			layout.addWidget(Qt.QLabel(self.tr("Verifying if the addon needs an update...")))
		else:
			layout.addWidget(Qt.QLabel(self.tr("Verifying which addon needs an update...")))
		self.progress = Qt.QProgressBar(self)
		self.progress.setRange(0, len(addons))
		self.progress.setValue(0)
		self.progress.setFormat("%v / %m | %p%")
		layout.addWidget(self.progress)
		cancelBox = Qt.QHBoxLayout()
		cancelBox.addStretch()
		self.cancelButton = Qt.QPushButton(self.tr("Cancel"), self)
		self.cancelButton.clicked.connect(self.onCancel)
		cancelBox.addWidget(self.cancelButton)
		cancelBox.addStretch()
		layout.addLayout(cancelBox)
		self.addons = addons
		self.maxThreads = int(settings.value(defines.LCURSE_MAXTHREADS_KEY, defines.LCURSE_MAXTHREADS_DEFAULT))
		self.sem = Qt.QSemaphore(self.maxThreads)

{'fraction_non_alphanumeric': 0.11423220973782772, 'fraction_numerical': 0.003745318352059925, 'mean_word_length': 5.4987834549878345, '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': '1024538', 'n_tokens_mistral': 956, 'n_tokens_neox': 913, 'n_words': 191}