mirror of
https://github.com/QData/TextAttack.git
synced 2021-10-13 00:05:06 +03:00
fix github flow and import issues
This commit is contained in:
2
.github/workflows/check-formatting.yml
vendored
2
.github/workflows/check-formatting.yml
vendored
@@ -28,7 +28,7 @@ jobs:
|
||||
python -m pip install --upgrade pip setuptools wheel
|
||||
pip install black flake8 isort # Testing packages
|
||||
python setup.py install_egg_info # Workaround https://github.com/pypa/pip/issues/4537
|
||||
pip install -e . ["dev"]
|
||||
pip install -e .[dev]
|
||||
- name: Check code format with black and isort
|
||||
run: |
|
||||
make lint
|
||||
|
||||
2
.github/workflows/run-pytest.yml
vendored
2
.github/workflows/run-pytest.yml
vendored
@@ -29,7 +29,7 @@ jobs:
|
||||
pip install pytest pytest-xdist # Testing packages
|
||||
pip uninstall textattack --yes # Remove TA if it's already installed
|
||||
python setup.py install_egg_info # Workaround https://github.com/pypa/pip/issues/4537
|
||||
pip install -e . ["dev"]
|
||||
pip install -e .[dev]
|
||||
pip freeze
|
||||
- name: Test with pytest
|
||||
run: |
|
||||
|
||||
@@ -17,3 +17,4 @@ tokenizers==0.8.1-rc2
|
||||
tqdm
|
||||
word2number
|
||||
num2words
|
||||
more-itertools
|
||||
@@ -1,4 +1,4 @@
|
||||
import textattack
|
||||
from .importing import LazyLoader
|
||||
|
||||
|
||||
def has_letter(word):
|
||||
@@ -202,7 +202,7 @@ def zip_flair_result(pred, tag_type="pos-fast"):
|
||||
return word_list, pos_list
|
||||
|
||||
|
||||
stanza = textattack.shared.utils.LazyLoader("stanza", globals(), "stanza")
|
||||
stanza = LazyLoader("stanza", globals(), "stanza")
|
||||
|
||||
|
||||
def zip_stanza_result(pred, tagset="universal"):
|
||||
|
||||
Reference in New Issue
Block a user