Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: Remove 'six' usage #1133

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions client/ayon_core/tools/pyblish_pype/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
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


Expand Down Expand Up @@ -985,15 +984,15 @@ def prepare_records(self, result, suspend_logs):
record_item = record
else:
record_item = {
"label": text_type(record.msg),
"label": str(record.msg),
"type": "record",
"levelno": record.levelno,
"threadName": record.threadName,
"name": record.name,
"filename": record.filename,
"pathname": record.pathname,
"lineno": record.lineno,
"msg": text_type(record.msg),
"msg": str(record.msg),
"msecs": record.msecs,
"levelname": record.levelname
}
Expand Down
3 changes: 1 addition & 2 deletions client/ayon_core/tools/pyblish_pype/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import collections

from qtpy import QtCore
from six import text_type
import pyblish.api

root = os.path.dirname(__file__)
Expand Down Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import json
import os

import six
from qtpy import QtCore, QtGui


Expand Down Expand Up @@ -152,7 +151,7 @@ def load_font(self,
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:
Expand Down