mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-18 19:30:25 +00:00
ruff: use readable rule names in ignores
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user