<commit_before># Copyright: <NAME> <<EMAIL>>
# -*- coding: utf-8 -*-
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html

from PyQt4.QtCore import PYQT_VERSION_STR, QT_VERSION_STR, SIGNAL
from PyQt4.QtGui import QDialog
from PyQt4.QtWebKit import QWebPage

import aqt.forms
from anki.lang import _
from aqt import appVersion
from aqt.utils import openLink


def show(parent):
    dialog = QDialog(parent)
    abt = aqt.forms.about.Ui_About()
    abt.setupUi(dialog)
    abt.label.page().setLinkDelegationPolicy(QWebPage.DelegateAllLinks)

    def onLink(url):
        openLink(url.toString())
    parent.connect(abt.label, SIGNAL("linkClicked(QUrl)"), onLink)
    abouttext = "<center><img src='qrc:/icons/anki-logo-thin.png'></center>"
    abouttext += '<p>' + _("Anki is a friendly, intelligent spaced learning \
system. It's free and open source.")
    abouttext += "<p>" + _(
        "Anki is licensed under the AGPL3 license. Please see "
        "the license file in the source distribution for more information.")
    abouttext += '<p>' + _("Version %s") % appVersion + '<br>'
    abouttext += ("Qt %s PyQt %s<br>") % (QT_VERSION_STR, PYQT_VERSION_STR)
    abouttext += (_("<a href='%s'>Visit website</a>") % aqt.appWebsite) + \
"</span>"
    abouttext += '<p>' + _("Written by <NAME>, with patches, translation,\
 testing and design from:<p>%(cont)s") % {'cont': u"""<NAME>, <NAME>,
<NAME>, <NAME>, <NAME>, <NAME>, <NAME>,
<NAME>, <NAME>, <NAME>, <NAME>, <NAME>,
<NAME>, <NAME>, <NAME>, <NAME>, <NAME>,
<NAME>, <NAME>, <NAME>, Iroiro, Jarvik7,
<NAME>, <NAME>, <NAME>, <NAME>, <NAME>, LaC, <NAME>,
<NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>,
<NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>,
Pcsl88, <NAME>, <NAME>, <NAME>, <NAME>,
<NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>,
Tacutu, <NAME>, <NAME>, Ursus, <NAME>, <NAME>, Xtru %s 黃文龍
"""% _("<!--about diag--> and")}
    abouttext += '<p>' + _("""\
The icons were obtained from various sources; please see the Anki source
for credits.""")
    abouttext += '<p>' + _("If you have contributed and are not on this list, \
please get in touch.")
    abouttext += '<p>' + _("A big thanks to all the people who have provided \
suggestions, bug reports and donations.")
    abt.label.setHtml(abouttext)
    dialog.adjustSize()
    dialog.show()
    dialog.exec_()<commit_msg>Re-cleaned per flake8.<commit_after># Copyright: <NAME> <<EMAIL>>
# -*- coding: utf-8 -*-
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html

from PyQt4.QtCore import PYQT_VERSION_STR, QT_VERSION_STR, SIGNAL
from PyQt4.QtGui import QDialog
from PyQt4.QtWebKit import QWebPage

import aqt.forms
from anki.lang import _
from aqt import appVersion
from aqt.utils import openLink


def show(parent):
    dialog = QDialog(parent)
    abt = aqt.forms.about.Ui_About()
    abt.setupUi(dialog)
    abt.label.page().setLinkDelegationPolicy(QWebPage.DelegateAllLinks)

    def onLink(url):
        openLink(url.toString())
    parent.connect(abt.label, SIGNAL("linkClicked(QUrl)"), onLink)
    abouttext = "<center><img src='qrc:/icons/anki-logo-thin.png'></center>"
    abouttext += '<p>' + _("Anki is a friendly, intelligent spaced learning \
system. It's free and open source.")
    abouttext += "<p>" + _(
        "Anki is licensed under the AGPL3 license. Please see "
        "the license file in the source distribution for more information.")
    abouttext += '<p>' + _("Version %s") % appVersion + '<br>'
    abouttext += ("Qt %s PyQt %s<br>") % (QT_VERSION_STR, PYQT_VERSION_STR)
    abouttext += (
        _("<a href='%s'>Visit website</a>") % aqt.appWebsite) + "</span>"
    abouttext += '<p>' + _("Written by <NAME>, with patches, \
    translation,\ testing and design from:<p>%(cont)s") \
        % {'cont': u"""<NAME>, <NAME>, <NAME>, <NAME>,
<NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>,
<NAME>, <NAME>, <NAME>, <NAME>,
<NAME>, <NAME>, <NAME>, <NAME>, Iroiro, Jarvik7,
<NAME>, <NAME>, <NAME>, <NAME>, <NAME>, LaC, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>,
<NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>,
<NAME>, <NAME>, <NAME>, <NAME>, <NAME>, Pcsl88, <NAME>, <NAME>, <NAME>,
<NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, Tacutu, <NAME>, <NAME>, Ursus, <NAME>, <NAME>, Xtru %s 黃文龍
""" % _("<!--about diag--> and")}
    abouttext += '<p>' + _("""\
The icons were obtained from various sources; please see the Anki source
for credits.""")
    abouttext += '<p>' + _("If you have contributed and are not on this list, \
please get in touch.")
    abouttext += '<p>' + _("A big thanks to all the people who have provided \
suggestions, bug reports and donations.")
    abt.label.setHtml(abouttext)
    dialog.adjustSize()
    dialog.show()
    dialog.exec_()
{'fraction_non_alphanumeric': 0.1996322026971802, 'fraction_numerical': 0.0038823048630976706, 'mean_word_length': 4.174418604651163, 'pattern_counts': {'":': 0, '<': 167, '<?xml version=': 0, '>': 167, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '2674489', 'n_tokens_mistral': 1728, 'n_tokens_neox': 1685, 'n_words': 505}