mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-25 09:26:27 +03:00
Escape encoding in validate function
This commit is contained in:
parent
27b927259a
commit
dc01acd821
|
@ -5,7 +5,7 @@ import requests
|
||||||
import pkg_resources
|
import pkg_resources
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
from ..compat import path2str
|
from ..compat import path2str, locale_escape
|
||||||
from ..util import prints, get_data_path, read_json
|
from ..util import prints, get_data_path, read_json
|
||||||
from .. import about
|
from .. import about
|
||||||
|
|
||||||
|
@ -94,7 +94,7 @@ def get_model_row(compat, name, data, type='package'):
|
||||||
tpl_red = '\x1b[38;5;1m{}\x1b[0m'
|
tpl_red = '\x1b[38;5;1m{}\x1b[0m'
|
||||||
tpl_green = '\x1b[38;5;2m{}\x1b[0m'
|
tpl_green = '\x1b[38;5;2m{}\x1b[0m'
|
||||||
if data['compat']:
|
if data['compat']:
|
||||||
comp = tpl_green.format('✔')
|
comp = tpl_green.format(locale_escape('✔', errors='ignore'))
|
||||||
version = tpl_green.format(data['version'])
|
version = tpl_green.format(data['version'])
|
||||||
else:
|
else:
|
||||||
comp = '--> {}'.format(compat.get(data['name'], ['n/a'])[0])
|
comp = '--> {}'.format(compat.get(data['name'], ['n/a'])[0])
|
||||||
|
|
Loading…
Reference in New Issue
Block a user