Merge pull request #1133 from ynput/enhancement/remove-six-usage

Chore: Remove 'six' usage
This commit is contained in:
Jakub Trllo 2025-02-17 10:28:07 +01:00 committed by GitHub
commit 07828401dd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 4 additions and 7 deletions

View file

@ -31,7 +31,6 @@ from . import settings, util
from .awesome import tags as awesome
from qtpy import QtCore, QtGui
import qtawesome
from six import text_type
from .constants import PluginStates, InstanceStates, GroupStates, Roles
@ -985,7 +984,7 @@ class TerminalModel(QtGui.QStandardItemModel):
record_item = record
else:
record_item = {
"label": text_type(record.msg),
"label": str(record.msg),
"type": "record",
"levelno": record.levelno,
"threadName": record.threadName,
@ -993,7 +992,7 @@ class TerminalModel(QtGui.QStandardItemModel):
"filename": record.filename,
"pathname": record.pathname,
"lineno": record.lineno,
"msg": text_type(record.msg),
"msg": str(record.msg),
"msecs": record.msecs,
"levelname": record.levelname
}

View file

@ -10,7 +10,6 @@ import sys
import collections
from qtpy import QtCore
from six import text_type
import pyblish.api
root = os.path.dirname(__file__)
@ -64,7 +63,7 @@ def u_print(msg, **kwargs):
**kwargs: Keyword argument for `print` function.
"""
if isinstance(msg, text_type):
if isinstance(msg, str):
encoding = None
try:
encoding = os.getenv('PYTHONIOENCODING', sys.stdout.encoding)

View file

@ -5,7 +5,6 @@ from __future__ import print_function
import json
import os
import six
from qtpy import QtCore, QtGui
@ -152,7 +151,7 @@ class IconicFont(QtCore.QObject):
def hook(obj):
result = {}
for key in obj:
result[key] = six.unichr(int(obj[key], 16))
result[key] = chr(int(obj[key], 16))
return result
if directory is None: