Skip to content

Commit e5cd7e2

Browse files
authored
Merge pull request #141 from twm/reformat
Reformat a few files with Black
2 parents 65bee43 + 07c5b0d commit e5cd7e2

4 files changed

Lines changed: 21 additions & 25 deletions

File tree

src/hyperlink/hypothesis.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ def idna_characters():
7878
)
7979
with open_gzip(dataFileName) as dataFile:
8080
reader = csv_reader(
81-
(line.decode("utf-8") for line in dataFile), delimiter=",",
81+
(line.decode("utf-8") for line in dataFile),
82+
delimiter=",",
8283
)
8384
next(reader) # Skip header row
8485
for row in reader:

src/hyperlink/test/common.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -16,26 +16,26 @@ def assertRaises( # type: ignore[override]
1616
):
1717
# type: (...) -> Any
1818
"""Fail unless an exception of class expected_exception is raised
19-
by callableObj when invoked with arguments args and keyword
20-
arguments kwargs. If a different type of exception is
21-
raised, it will not be caught, and the test case will be
22-
deemed to have suffered an error, exactly as for an
23-
unexpected exception.
19+
by callableObj when invoked with arguments args and keyword
20+
arguments kwargs. If a different type of exception is
21+
raised, it will not be caught, and the test case will be
22+
deemed to have suffered an error, exactly as for an
23+
unexpected exception.
2424
25-
If called with callableObj omitted or None, will return a
26-
context object used like this::
25+
If called with callableObj omitted or None, will return a
26+
context object used like this::
2727
28-
with self.assertRaises(SomeException):
29-
do_something()
28+
with self.assertRaises(SomeException):
29+
do_something()
3030
31-
The context manager keeps a reference to the exception as
32-
the 'exception' attribute. This allows you to inspect the
33-
exception after the assertion::
31+
The context manager keeps a reference to the exception as
32+
the 'exception' attribute. This allows you to inspect the
33+
exception after the assertion::
3434
35-
with self.assertRaises(SomeException) as cm:
36-
do_something()
37-
the_exception = cm.exception
38-
self.assertEqual(the_exception.error_code, 3)
35+
with self.assertRaises(SomeException) as cm:
36+
do_something()
37+
the_exception = cm.exception
38+
self.assertEqual(the_exception.error_code, 3)
3939
"""
4040
context = _AssertRaisesContext(expected_exception, self)
4141
if callableObj is None:

src/hyperlink/test/test_common.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,11 @@
77

88

99
class _ExpectedException(Exception):
10-
"""An exception used to test HyperlinkTestCase.assertRaises.
11-
12-
"""
10+
"""An exception used to test HyperlinkTestCase.assertRaises."""
1311

1412

1513
class _UnexpectedException(Exception):
16-
"""An exception used to test HyperlinkTestCase.assertRaises.
17-
18-
"""
14+
"""An exception used to test HyperlinkTestCase.assertRaises."""
1915

2016

2117
class TestHyperlink(TestCase):

tox.ini

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,7 @@ deps =
126126
pep8-naming==0.11.1
127127
pycodestyle==2.6.0
128128
pydocstyle==5.1.1
129-
# pin pyflakes pending a release with https://github.com/PyCQA/pyflakes/pull/455
130-
git+git://github.com/PyCQA/pyflakes@ffe9386#egg=pyflakes
129+
pyflakes==2.2.0
131130

132131
commands =
133132
flake8 {posargs:setup.py src/{env:PY_MODULE}}

0 commit comments

Comments
 (0)