ruff: use readable rule names in ignores

This commit is contained in:
Andrej730
2026-08-10 16:13:33 +05:00
parent b6dccce12a
commit 109bd58384
9 changed files with 14 additions and 12 deletions
@@ -987,7 +987,7 @@ class ExportCostSchedulesToPDF(bpy.types.Operator, ExportHelper):
@classmethod
def poll(cls, context):
try:
import typst # noqa: F401
import typst # ruff: ignore[unused-import]
return True
except ModuleNotFoundError:
@@ -28,7 +28,7 @@ operators via ``target_set_operator``; drag handles inherit modal state
from ``GizmoMovable``.
"""
__all__ = [ # noqa: RUF022 (unsorted `__all__`)
__all__ = [ # ruff: ignore[unsorted-dunder-all]
"GizmoColor",
"GizmoAxis",
"TextAlignment",
+1 -1
View File
@@ -430,7 +430,7 @@ class SverchokData:
@classmethod
def has_sverchok(cls) -> bool:
try:
import sverchok # noqa: F401
import sverchok # ruff: ignore[unused-import]
return True
except ModuleNotFoundError:
+1 -1
View File
@@ -17,7 +17,7 @@
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
#
# Ignore unused imports.
# ruff: noqa: F401
# ruff: file-ignore[unused-import]
from bonsai.tool.aggregate import Aggregate
from bonsai.tool.array import Array
+4 -4
View File
@@ -45,10 +45,10 @@ for dep in dependencies:
subprocess.check_call(command + [dep])
try:
import pygments # noqa: F401
import pytest # noqa: F401
import pytest_bdd # noqa: F401
import pytest_blender # noqa: F401
import pygments # ruff: ignore[unused-import]
import pytest # ruff: ignore[unused-import]
import pytest_bdd # ruff: ignore[unused-import]
import pytest_blender # ruff: ignore[unused-import]
print("Test dependency installation was successful!")
except Exception as e:
@@ -40,7 +40,7 @@ def _has_occ():
pass
try:
import OCC.BRepTools # noqa: F401 # pyright: ignore[reportMissingImports] # ty:ignore[unresolved-import]
import OCC.BRepTools # ruff: ignore[unused-import] # pyright: ignore[reportMissingImports] # ty:ignore[unresolved-import]
return True
except ImportError:
@@ -52,6 +52,6 @@ def _has_occ():
has_occ = _has_occ()
if has_occ:
from . import occ_utils as utils # noqa: F401
from . import occ_utils as utils # ruff: ignore[unused-import]
from .main import *
@@ -25,7 +25,7 @@ import time
import ifcopenshell.ifcopenshell_wrapper as W
try:
from OCC.Core import AIS # noqa: F401
from OCC.Core import AIS # ruff: ignore[unused-import]
USE_OCCT_HANDLE = False
except ImportError:
@@ -26,7 +26,7 @@ import ifcopenshell.util.element
import ifcpatch
try:
import sqlite3 # noqa: F401
import sqlite3 # ruff: ignore[unused-import]
except:
print("No SQLite support")