Skip to content

Commit

Permalink
Fixed #35, and some formatting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jmsv committed Jun 19, 2018
1 parent f78634f commit 30a00ce
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 32 deletions.
1 change: 1 addition & 0 deletions Pipfile
Expand Up @@ -6,6 +6,7 @@ name = "pypi"
[packages]
treelib = "*"
colorful = "*"
six = "*"

[dev-packages]
pylint = "*"
Expand Down
27 changes: 10 additions & 17 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions ety/__main__.py
@@ -1,6 +1,6 @@
#!/usr/local/bin/python
# -*- coding: utf-8 -*-

import ety
from ety import cli

ety.cli()
cli()
11 changes: 0 additions & 11 deletions ety/data.py
Expand Up @@ -18,17 +18,6 @@ def load_country_codes():
with io.open(resource, 'r', encoding='utf-8') as f:
return json.load(f)

# loaded_langs = []
# resource = resource_filename('ety', 'wn/iso-639-3.json')
# with io.open(resource, 'r', encoding='utf-8') as f:
# countries_json = json.load(f)
# for country in countries_json:
# loaded_langs.append({
# 'name': country['name'],
# 'iso6393': country['iso6393'],
# })
# return loaded_langs


etyms = load_relety()
langs = load_country_codes()
4 changes: 3 additions & 1 deletion ety/word.py
Expand Up @@ -7,10 +7,12 @@
from .language import Language
from .tree import EtyTree

from six import string_types


class Word(object):
def __init__(self, word, language='eng', is_source=False):
if not isinstance(word, ("".__class__, u"".__class__)):
if not isinstance(word, string_types):
raise ValueError('word must be a string')
self.word = word
self.language = Language(language)
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
@@ -1,3 +1,4 @@
treelib
colorful
six

2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -33,7 +33,7 @@
keywords='etymology origins english language words',
packages=['ety'],
install_requires=[
"treelib", "colorful",
"treelib", "colorful", "six",
],
extras_require={
'dev': ['flake8'],
Expand Down

0 comments on commit 30a00ce

Please sign in to comment.