Skip to content

Commit

Permalink
Suppress F821
Browse files Browse the repository at this point in the history
Workaround for astral-sh/ruff#13296
  • Loading branch information
jaraco committed Sep 9, 2024
1 parent 5d2fa66 commit 2e3f413
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_path.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,10 @@ def test_encoding_warnings(self, alpharep):
"""EncodingWarning must blame the read_text and open calls."""
assert sys.flags.warn_default_encoding
root = zipfile.Path(alpharep)
with self.assertWarns(EncodingWarning) as wc:
with self.assertWarns(EncodingWarning) as wc: # noqa: F821 (astral-sh/ruff#13287)
root.joinpath("a.txt").read_text()
assert __file__ == wc.filename
with self.assertWarns(EncodingWarning) as wc:
with self.assertWarns(EncodingWarning) as wc: # noqa: F821 (astral-sh/ruff#13287)
root.joinpath("a.txt").open("r").close()
assert __file__ == wc.filename

Expand Down

0 comments on commit 2e3f413

Please sign in to comment.