Re-attempt migration with modernize

This commit is contained in:
eyedeekay
2023-11-22 14:48:24 -05:00
parent 53b17e206f
commit 8ebc4de1a7
29 changed files with 216 additions and 163 deletions

View File

@ -1,5 +1,7 @@
# -*- coding: utf8 -*-
from __future__ import absolute_import
from __future__ import print_function
import os
import sys
from jinja2 import nodes
@ -9,6 +11,7 @@ from pygments import highlight
from pygments.lexers import get_lexer_by_name, guess_lexer
from pygments.formatters import HtmlFormatter
from pygments.util import ClassNotFound
import six
try:
import ctags
@ -29,8 +32,8 @@ def we_are_frozen():
def module_path():
encoding = sys.getfilesystemencoding()
if we_are_frozen():
return os.path.dirname(unicode(sys.executable, encoding))
return os.path.dirname(unicode(__file__, encoding))
return os.path.dirname(six.text_type(sys.executable, encoding))
return os.path.dirname(six.text_type(__file__, encoding))
class HighlightExtension(Extension):