<commit_before>"""Convenience to import Qt if it is availible, otherwise provide stubs.

Normally I wouldn't bother with something like this, but due to the
testing contexts that we often run we may import stuff from uitools that
does not have Qt avilaible.

"""

__all__ = ['Qt', 'QtCore', 'QtGui']

try:
    from PyQt4 import QtCore, QtGui
except ImportError:
    for name in __all__:
        globals().setdefault(name, None)
else:
    Qt = QtCore.Qt
<commit_msg>Fall back onto PySide if availible<commit_after>"""Convenience to import Qt if it is availible, otherwise provide stubs.

Normally I wouldn't bother with something like this, but due to the
testing contexts that we often run we may import stuff from uitools that
does not have Qt avilaible.

"""

__all__ = ['Qt', 'QtCore', 'QtGui']

try:
    from PyQt4 import QtCore, QtGui
except ImportError:
    try:
        from PySide import QtCore, QtGui
    except ImportError:
        for name in __all__:
            globals().setdefault(name, None)


Qt = QtCore.Qt if QtCore else None
{'fraction_non_alphanumeric': 0.07471264367816093, 'fraction_numerical': 0.0019157088122605363, 'mean_word_length': 3.6651785714285716, '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': '1492101', 'n_tokens_mistral': 320, 'n_tokens_neox': 311, 'n_words': 140}