Skip to content

Commit ebabe82

Browse files
authored
Fix flake8 issues introduced as a result of #1546 (#1617)
1 parent c31a400 commit ebabe82

File tree

6 files changed

+7
-16
lines changed

6 files changed

+7
-16
lines changed

.flake8

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
[flake8]
2-
ignore = E401,E402,E501,E722,W503,W504,F821,B006,B007,B008,B009
3-
select = D417 # Missing argument descriptions in the docstring
2+
ignore =
3+
E401,E402,E501,E722,W503,W504,F821,B006,B007,B008,B009,
4+
E203 # https://github.com/PyCQA/pycodestyle/issues/373
5+
select =
6+
B,C,E,F,P,T4,W,B9,
7+
D417 # Missing argument descriptions in the docstring
48
max-line-length = 120
59
exclude = docs/source,third_party

torchtext/data/datasets_utils.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,7 @@
77
import torch
88
from torch.utils.data import functional_datapipe, IterDataPipe
99
from torch.utils.data.datapipes.utils.common import StreamWrapper
10-
from torchtext.utils import download_from_url, extract_archive, unicode_csv_reader, validate_file
11-
from torchtext.utils import (
12-
validate_file,
13-
download_from_url,
14-
extract_archive,
15-
)
10+
from torchtext.utils import download_from_url, extract_archive, validate_file
1611

1712
try:
1813
import defusedxml.ElementTree as ET

torchtext/datasets/ag_news.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
from torchdata.datapipes.iter import FileOpener, HttpReader, IterableWrapper
1212

1313

14-
from torchtext.data.datasets_utils import _add_docstring_header, _create_dataset_directory, _wrap_split_argument
15-
1614
URL = {
1715
"train": "https://raw.githubusercontent.com/mhjabreel/CharCnn_Keras/master/data/ag_news_csv/train.csv",
1816
"test": "https://raw.githubusercontent.com/mhjabreel/CharCnn_Keras/master/data/ag_news_csv/test.csv",

torchtext/datasets/conll2000chunking.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
from torchdata.datapipes.iter import FileOpener, HttpReader, IterableWrapper
1212

1313

14-
from torchtext.data.datasets_utils import _add_docstring_header, _create_dataset_directory, _wrap_split_argument
15-
1614
URL = {
1715
"train": "https://www.clips.uantwerpen.be/conll2000/chunking/train.txt.gz",
1816
"test": "https://www.clips.uantwerpen.be/conll2000/chunking/test.txt.gz",

torchtext/datasets/squad1.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
from torchdata.datapipes.iter import FileOpener, HttpReader, IterableWrapper
1212

1313

14-
from torchtext.data.datasets_utils import _add_docstring_header, _create_dataset_directory, _wrap_split_argument
15-
1614
URL = {
1715
"train": "https://rajpurkar.github.io/SQuAD-explorer/dataset/train-v1.1.json",
1816
"dev": "https://rajpurkar.github.io/SQuAD-explorer/dataset/dev-v1.1.json",

torchtext/datasets/squad2.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
from torchdata.datapipes.iter import FileOpener, HttpReader, IterableWrapper
1212

1313

14-
from torchtext.data.datasets_utils import _add_docstring_header, _create_dataset_directory, _wrap_split_argument
15-
1614
URL = {
1715
"train": "https://rajpurkar.github.io/SQuAD-explorer/dataset/train-v2.0.json",
1816
"dev": "https://rajpurkar.github.io/SQuAD-explorer/dataset/dev-v2.0.json",

0 commit comments

Comments
 (0)