diff --git a/code_annotations/base.py b/code_annotations/base.py index e3d4970..8ca88b2 100644 --- a/code_annotations/base.py +++ b/code_annotations/base.py @@ -8,7 +8,6 @@ import re from abc import ABCMeta, abstractmethod -import six import yaml from stevedore import named @@ -282,8 +281,7 @@ def _configure_extensions(self): )) -@six.add_metaclass(ABCMeta) -class BaseSearch(object): +class BaseSearch(object, metaclass=ABCMeta): """ Base class for searchers. """ diff --git a/code_annotations/extensions/base.py b/code_annotations/extensions/base.py index 9e46d91..6dcb470 100644 --- a/code_annotations/extensions/base.py +++ b/code_annotations/extensions/base.py @@ -4,13 +4,10 @@ import re from abc import ABCMeta, abstractmethod -import six - from code_annotations.helpers import clean_abs_path, get_annotation_regex -@six.add_metaclass(ABCMeta) -class AnnotationExtension(object): +class AnnotationExtension(object, metaclass=ABCMeta): """ Abstract base class that annotation extensions will inherit from. """ @@ -36,8 +33,7 @@ def search(self, file_handle): # pragma: no cover raise NotImplementedError('search called on base class!') -@six.add_metaclass(ABCMeta) -class SimpleRegexAnnotationExtension(AnnotationExtension): +class SimpleRegexAnnotationExtension(AnnotationExtension, metaclass=ABCMeta): """ Abstract base class for languages that have comments which can be reasonably searched using regular expressions. """ diff --git a/code_annotations/find_django.py b/code_annotations/find_django.py index d73ff03..225fa06 100644 --- a/code_annotations/find_django.py +++ b/code_annotations/find_django.py @@ -11,7 +11,6 @@ import yaml from django.apps import apps from django.db import models -from six import text_type from code_annotations.base import BaseSearch from code_annotations.helpers import fail, get_annotation_regex @@ -162,7 +161,7 @@ def _append_safelisted_model_annotations(self, safelisted_models, model_id, mode 'annotation_data': comment.strip(), 'extra': { 'object_id': model_id, - 'full_comment': text_type(safelisted_models[model_id]) + 'full_comment': str(safelisted_models[model_id]) } }) diff --git a/docs/conf.py b/docs/conf.py index 32a498a..d9296e5 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -22,7 +22,6 @@ from subprocess import check_call import edx_theme -import six def get_version(*file_paths): @@ -496,5 +495,5 @@ def on_init(app): # pylint: disable=unused-argument def setup(app): """Sphinx extension: run sphinx-apidoc.""" - event = 'builder-inited' if six.PY3 else b'builder-inited' + event = 'builder-inited' app.connect(event, on_init)