Skip to content

Commit 4ff68f7

Browse files
authored
remove encoding from json.loads call (#71)
1 parent 3866d7c commit 4ff68f7

File tree

5 files changed

+26
-11
lines changed

5 files changed

+26
-11
lines changed

.travis.yml

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,24 @@
11
language: python
2-
matrix:
2+
jobs:
33
include:
4-
- python: 2.7
5-
- python: 3.4
6-
- python: 3.5
7-
- python: 3.6
8-
- python: 3.7
4+
- os: linux
5+
dist: bionic
6+
python: 2.7
7+
- os: linux
98
dist: xenial
10-
sudo: true
9+
python: 3.4
10+
- os: linux
11+
dist: xenial
12+
python: 3.5
13+
- os: linux
14+
dist: bionic
15+
python: 3.6
16+
- os: linux
17+
dist: bionic
18+
python: 3.7
19+
- os: linux
20+
dist: bionic
21+
python: 3.8
1122

1223
install:
1324
- pip install -r requirements/requirements-dev.txt

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# pyspellchecker
22

3+
## Version 0.5.5
4+
* Remove `encode` from the call to `json.loads()`
5+
36
## Version 0.5.4
47
* Reduce words in __edit_distance_alt to improve memory performance; thanks [blayzen-w](https://github.com/blayzen-w)
58

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ def read_file(filepath):
4646
'Programming Language :: Python :: 3.4',
4747
'Programming Language :: Python :: 3.5',
4848
'Programming Language :: Python :: 3.6',
49-
'Programming Language :: Python :: 3.7'
49+
'Programming Language :: Python :: 3.7',
50+
'Programming Language :: Python :: 3.8'
5051
],
5152
test_suite = 'tests'
5253
)

spellchecker/info.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
__maintainer__ = "Tyler Barrus"
66
__email__ = "barrust@gmail.com"
77
__license__ = "MIT"
8-
__version__ = "0.5.4"
8+
__version__ = "0.5.5"
99
__credits__ = ["Peter Norvig"]
1010
__url__ = "https://github.com/barrust/pyspellchecker"
1111
__bugtrack_url__ = "{0}/issues".format(__url__)

spellchecker/spellchecker.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class SpellChecker(object):
1717
1818
Args:
1919
language (str): The language of the dictionary to load or None \
20-
for no dictionary. Supported languages are `en`, `es`, `de`, fr` \
20+
for no dictionary. Supported languages are `en`, `es`, `de`, `fr` \
2121
and `pt`. Defaults to `en`
2222
local_dictionary (str): The path to a locally stored word \
2323
frequency dictionary; if provided, no language will be loaded
@@ -419,7 +419,7 @@ def load_dictionary(self, filename, encoding="utf-8"):
419419
encoding (str): The encoding of the dictionary """
420420
with load_file(filename, encoding) as data:
421421
data = data if self._case_sensitive else data.lower()
422-
self._dictionary.update(json.loads(data, encoding=encoding))
422+
self._dictionary.update(json.loads(data))
423423
self._update_dictionary()
424424

425425
def load_text_file(self, filename, encoding="utf-8", tokenizer=None):

0 commit comments

Comments
 (0)