Skip to content

Commit 23981ae

Browse files
Add flake8 to travis and fix its errors
1 parent 0577dff commit 23981ae

3 files changed

Lines changed: 3 additions & 2 deletions

File tree

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@ install:
1414
script:
1515
- py.test --doctest-modules --cov=doi src tests
1616
- mypy src/ tests
17+
- flake8 src/ tests
1718
after_success:
1819
- coveralls

src/doi/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def validate_doi(doi: str) -> Optional[str]:
4343
:param doi: Identifier.
4444
:returns: The URL assigned to the DOI or ``None``.
4545
"""
46-
from urllib.error import HTTPError, URLError
46+
from urllib.error import HTTPError
4747
import urllib.request
4848
import urllib.parse
4949
import json

tests/test_doi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def test_find_doi_in_line() -> None:
6666
('http://.scitation.org/doi/10.1063/1.mart(88)1498?asdfwer',
6767
'10.1063/1.mart(88)1498'),
6868
('@ibook{doi:10.1002/9780470125915.ch2,', '10.1002/9780470125915.ch2'),
69-
('<rdf:Description rdf:about="" xmlns:dc="http://purl.org/dc/elements/1'
69+
('<rdf:Description rdf:about="" xmlns:dc="http://purl.org/dc/elements'
7070
'.1/"><dc:format>application/pdf</dc:format><dc:identifier>'
7171
'doi:10.1063/1.5079474</dc:identifier></rdf:Description>',
7272
'10.1063/1.5079474'),

0 commit comments

Comments
 (0)