Skip to content

Commit fa0bdac

Browse files
author
Ned Batchelder
committed
refactor(test): i like this way of quieting pylint better
1 parent 91e7102 commit fa0bdac

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/test_config.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ def test_unknown_option():
136136
config = Config.read()
137137
expected = "Scriv configuration has no 'foo' option"
138138
with pytest.raises(AttributeError, match=expected):
139-
config.foo # pylint: disable=pointless-statement
139+
_ = config.foo
140140

141141

142142
def test_custom_template(changelog_d):
@@ -180,7 +180,7 @@ def test_no_such_template():
180180
msg = r"No such file: changelog\.d[/\\]foo\.j2"
181181
with pytest.raises(ScrivException, match=msg):
182182
config = Config(new_fragment_template="file: foo.j2")
183-
config.new_fragment_template # pylint: disable=pointless-statement
183+
_ = config.new_fragment_template
184184

185185

186186
def test_override_default_name(changelog_d):
@@ -214,7 +214,7 @@ def test_literal_no_file():
214214
FileNotFoundError, match=r"No such file or directory: 'sub/foob.py'"
215215
):
216216
config = Config(version="literal:sub/foob.py: __version__")
217-
config.version # pylint: disable=pointless-statement
217+
_ = config.version
218218

219219

220220
def test_literal_no_literal(temp_dir):
@@ -228,7 +228,7 @@ def test_literal_no_literal(temp_dir):
228228
match=r"Couldn't find literal: 'literal:sub/foob.py: version'",
229229
):
230230
config = Config(version="literal:sub/foob.py: version")
231-
config.version # pylint: disable=pointless-statement
231+
_ = config.version
232232

233233

234234
@pytest.mark.parametrize("chars", ["", "#", "#=-", "# ", " "])

0 commit comments

Comments
 (0)