Skip to content

Commit

Permalink
remove six dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
Hideo Hattori committed Feb 13, 2020
1 parent 49defaa commit 63684e6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
3 changes: 1 addition & 2 deletions lib/woothee/util.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
# -*- coding: utf-8 -*-
from __future__ import (division, print_function,
absolute_import, unicode_literals)
import six

from . import dataset


def update_map(target, source):
for key in six.iterkeys(source):
for key in source.keys():
if key == dataset.KEY_LABEL or key == dataset.KEY_TYPE:
continue
if len(source[key]) > 0:
Expand Down
6 changes: 2 additions & 4 deletions scripts/dataset_yaml2py.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
import yaml
import datetime

import six

base_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
dataset_file = os.path.join(base_dir, 'woothee', 'dataset.yaml')
py_file = os.path.join(base_dir, 'lib', 'woothee', 'dataset.py')
Expand Down Expand Up @@ -115,8 +113,8 @@ def get(label):
return DATASET[label]
""" % dynamic_lines

fp = open(py_file, 'wb')
fp = open(py_file, 'w')
try:
fp.write(six.b(module_text))
fp.write(module_text)
finally:
fp.close()
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
]


install_requires = ['six>=1.8.0']
install_requires = []

if sys.version_info < (3, 5):
install_requires.append('typing')
Expand Down Expand Up @@ -72,7 +72,7 @@ def run(self):
},
platforms='any',
install_requires=install_requires,
setup_requires=['PyYAML>=3.10', 'six>=1.8.0', 'pytest-runner'],
setup_requires=['PyYAML>=3.10', 'pytest-runner'],
tests_require=['pytest', 'pytest-cov', 'pytest-mock'],
long_description=long_description,
classifiers=classifiers,
Expand Down

0 comments on commit 63684e6

Please sign in to comment.