Skip to content

Commit ec2d79d

Browse files
committed
Reformat with Black
1 parent 65bee43 commit ec2d79d

3 files changed

Lines changed: 20 additions & 23 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):

0 commit comments

Comments
 (0)