From 36fdf0c48604641b45553485d1a38a7e6478d981 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Chapoton?= Date: Sat, 14 Dec 2019 00:40:56 +0100 Subject: [PATCH] remove some unused imports (#260) * remove some unused imports as suggested by lgtm https://lgtm.com/projects/g/yaml/pyyaml/ * add back import * from nodes * remove also sys import * remove mkpath import --- lib/yaml/representer.py | 3 ++- lib3/yaml/representer.py | 2 +- setup.py | 1 - 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/yaml/representer.py b/lib/yaml/representer.py index 9dca41a..93e09b6 100644 --- a/lib/yaml/representer.py +++ b/lib/yaml/representer.py @@ -3,11 +3,12 @@ __all__ = ['BaseRepresenter', 'SafeRepresenter', 'Representer', 'RepresenterError'] from error import * + from nodes import * import datetime -import sys, copy_reg, types +import copy_reg, types class RepresenterError(YAMLError): pass diff --git a/lib3/yaml/representer.py b/lib3/yaml/representer.py index dd14401..3b0b192 100644 --- a/lib3/yaml/representer.py +++ b/lib3/yaml/representer.py @@ -5,7 +5,7 @@ __all__ = ['BaseRepresenter', 'SafeRepresenter', 'Representer', from .error import * from .nodes import * -import datetime, sys, copyreg, types, base64, collections +import datetime, copyreg, types, base64, collections class RepresenterError(YAMLError): pass diff --git a/setup.py b/setup.py index a1a2baa..1905fe5 100644 --- a/setup.py +++ b/setup.py @@ -65,7 +65,6 @@ from distutils import log from distutils.core import setup, Command from distutils.core import Distribution as _Distribution from distutils.core import Extension as _Extension -from distutils.dir_util import mkpath from distutils.command.build_ext import build_ext as _build_ext from distutils.command.bdist_rpm import bdist_rpm as _bdist_rpm from distutils.errors import DistutilsError, CompileError, LinkError, DistutilsPlatformError