Skip to content

Commit c1f92c3

Browse files
author
Frederik Elwert
committed
Modernize code for Python 3.9+
1 parent d1521f6 commit c1f92c3

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

pelican/plugins/i18n_subsites/i18n_subsites.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,14 @@
1010
import os
1111
import posixpath
1212

13-
import six
14-
1513
try:
1614
from collections.abc import OrderedDict
1715
except ImportError:
1816
from collections import OrderedDict
1917
from contextlib import contextmanager
2018
import gettext
2119
import locale
22-
23-
from six.moves.urllib.parse import urlparse
20+
from urllib.parse import urlparse
2421

2522
from pelican import signals
2623
from pelican.generators import ArticlesGenerator, PagesGenerator
@@ -405,7 +402,7 @@ def update_generators():
405402
def get_pelican_cls(settings):
406403
"""Get the Pelican class requested in settings."""
407404
cls = settings["PELICAN_CLASS"]
408-
if isinstance(cls, six.string_types):
405+
if isinstance(cls, str):
409406
module, cls_name = cls.rsplit(".", 1)
410407
module = __import__(module)
411408
cls = getattr(module, cls_name)

0 commit comments

Comments
 (0)