File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -117,6 +117,7 @@ lint.ignore = [
117117 " PLR091" , # Too many statements/branches/arguments
118118 " PLR2004" , # Magic value used in comparison, consider replacing <int> with a constant variable
119119 " RUF012" , # Mutable class attributes https://github.com/astral-sh/ruff/issues/5243
120+ " SIM105" , # Use contextlib.suppress(ImportError) instead of try-except-pass
120121 " SLF001" , # private-member-access
121122
122123 # Should be fixed later
Original file line number Diff line number Diff line change 1- import contextlib
2-
31# Try to import png library.
42PngWriter = None
53
6- with contextlib . suppress ( ImportError ) :
4+ try :
75 from png import Writer as PngWriter # noqa: F401
6+ except ImportError :
7+ pass
You can’t perform that action at this time.
0 commit comments