@@ -30,7 +30,9 @@ def test_detects_standard_logging_module(self):
30
30
)
31
31
self .checker .visit_module (None )
32
32
self .checker .visit_import (stmts [0 ])
33
- with self .assertAddsMessages (Message ("logging-not-lazy" , node = stmts [1 ], args = ("lazy %" ,))):
33
+ with self .assertAddsMessages (
34
+ Message ("logging-not-lazy" , node = stmts [1 ], args = ("lazy %" ,))
35
+ ):
34
36
self .checker .visit_call (stmts [1 ])
35
37
36
38
def test_dont_crash_on_invalid_format_string (self ):
@@ -51,7 +53,9 @@ def test_detects_renamed_standard_logging_module(self):
51
53
)
52
54
self .checker .visit_module (None )
53
55
self .checker .visit_import (stmts [0 ])
54
- with self .assertAddsMessages (Message ("logging-not-lazy" , node = stmts [1 ], args = ("lazy %" ,))):
56
+ with self .assertAddsMessages (
57
+ Message ("logging-not-lazy" , node = stmts [1 ], args = ("lazy %" ,))
58
+ ):
55
59
self .checker .visit_call (stmts [1 ])
56
60
57
61
@set_config (logging_modules = ["logging" , "my.logging" ])
@@ -64,7 +68,9 @@ def test_nonstandard_logging_module(self):
64
68
)
65
69
self .checker .visit_module (None )
66
70
self .checker .visit_import (stmts [0 ])
67
- with self .assertAddsMessages (Message ("logging-not-lazy" , node = stmts [1 ], args = ("lazy %" ,))):
71
+ with self .assertAddsMessages (
72
+ Message ("logging-not-lazy" , node = stmts [1 ], args = ("lazy %" ,))
73
+ ):
68
74
self .checker .visit_call (stmts [1 ])
69
75
70
76
def _assert_logging_format_no_messages (self , stmt ):
0 commit comments