fix: fixing an issue with pre-commit with mypy and flake8

This commit is contained in:
Sean Malloy 2023-08-27 15:03:42 -07:00
parent 17e8f2b3fc
commit 19d6b12b2a
2 changed files with 2 additions and 1 deletions

View File

@ -336,6 +336,7 @@ Samuele Pedroni
Sanket Duthade
Sankt Petersbug
Saravanan Padmanaban
Sean Malloy
Segev Finer
Serhii Mozghovyi
Seth Junot

View File

@ -15,7 +15,7 @@ from py.path import local
def ignore_encoding_warning():
with warnings.catch_warnings():
with contextlib.suppress(NameError): # new in 3.10
warnings.simplefilter("ignore", EncodingWarning)
warnings.simplefilter("ignore", EncodingWarning) # type: ignore [name-defined] # noqa: F821
yield