mirror of
https://github.com/davidhalter/parso.git
synced 2025-12-09 22:25:53 +08:00
Remove use_metaclass, it's no longer used
This commit is contained in:
@@ -14,13 +14,6 @@ except NameError:
|
|||||||
is_pypy = platform.python_implementation() == 'PyPy'
|
is_pypy = platform.python_implementation() == 'PyPy'
|
||||||
|
|
||||||
|
|
||||||
def use_metaclass(meta, *bases):
|
|
||||||
""" Create a class with a metaclass. """
|
|
||||||
if not bases:
|
|
||||||
bases = (object,)
|
|
||||||
return meta("HackClass", bases, {})
|
|
||||||
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
encoding = sys.stdout.encoding
|
encoding = sys.stdout.encoding
|
||||||
if encoding is None:
|
if encoding is None:
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
from contextlib import contextmanager
|
from contextlib import contextmanager
|
||||||
|
|
||||||
from parso._compatibility import use_metaclass
|
|
||||||
|
|
||||||
|
|
||||||
class _NormalizerMeta(type):
|
class _NormalizerMeta(type):
|
||||||
def __new__(cls, name, bases, dct):
|
def __new__(cls, name, bases, dct):
|
||||||
@@ -11,7 +9,7 @@ class _NormalizerMeta(type):
|
|||||||
return new_cls
|
return new_cls
|
||||||
|
|
||||||
|
|
||||||
class Normalizer(use_metaclass(_NormalizerMeta)):
|
class Normalizer(metaclass=_NormalizerMeta):
|
||||||
_rule_type_instances = {}
|
_rule_type_instances = {}
|
||||||
_rule_value_instances = {}
|
_rule_value_instances = {}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user