We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fa212b7 commit b2a1f3fCopy full SHA for b2a1f3f
pyproject.toml
@@ -117,6 +117,7 @@ lint.ignore = [
117
"PLR091", # Too many statements/branches/arguments
118
"PLR2004", # Magic value used in comparison, consider replacing <int> with a constant variable
119
"RUF012", # Mutable class attributes https://github.com/astral-sh/ruff/issues/5243
120
+ "SIM105", # Use contextlib.suppress(ImportError) instead of try-except-pass
121
"SLF001", # private-member-access
122
123
# Should be fixed later
qrcode/compat/png.py
@@ -1,7 +1,7 @@
1
-import contextlib
2
-
3
# Try to import png library.
4
PngWriter = None
5
6
-with contextlib.suppress(ImportError):
+try:
7
from png import Writer as PngWriter # noqa: F401
+except ImportError:
+ pass
0 commit comments