mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-29 03:37:21 +00:00
ruff: use readable rule names in ignores
This commit is contained in:
@@ -68,6 +68,8 @@ select = [
|
|||||||
"I", # import sorting
|
"I", # import sorting
|
||||||
"unused-noqa",
|
"unused-noqa",
|
||||||
"rule-codes-in-selectors",
|
"rule-codes-in-selectors",
|
||||||
|
"noqa-comments",
|
||||||
|
"rule-codes-in-suppression-comments",
|
||||||
]
|
]
|
||||||
ignore = [
|
ignore = [
|
||||||
# Conflicts with Blender using annotations for props definitions.
|
# Conflicts with Blender using annotations for props definitions.
|
||||||
|
|||||||
@@ -987,7 +987,7 @@ class ExportCostSchedulesToPDF(bpy.types.Operator, ExportHelper):
|
|||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
try:
|
try:
|
||||||
import typst # noqa: F401
|
import typst # ruff: ignore[unused-import]
|
||||||
|
|
||||||
return True
|
return True
|
||||||
except ModuleNotFoundError:
|
except ModuleNotFoundError:
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ operators via ``target_set_operator``; drag handles inherit modal state
|
|||||||
from ``GizmoMovable``.
|
from ``GizmoMovable``.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__all__ = [ # noqa: RUF022 (unsorted `__all__`)
|
__all__ = [ # ruff: ignore[unsorted-dunder-all]
|
||||||
"GizmoColor",
|
"GizmoColor",
|
||||||
"GizmoAxis",
|
"GizmoAxis",
|
||||||
"TextAlignment",
|
"TextAlignment",
|
||||||
|
|||||||
@@ -430,7 +430,7 @@ class SverchokData:
|
|||||||
@classmethod
|
@classmethod
|
||||||
def has_sverchok(cls) -> bool:
|
def has_sverchok(cls) -> bool:
|
||||||
try:
|
try:
|
||||||
import sverchok # noqa: F401
|
import sverchok # ruff: ignore[unused-import]
|
||||||
|
|
||||||
return True
|
return True
|
||||||
except ModuleNotFoundError:
|
except ModuleNotFoundError:
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
|
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
# Ignore unused imports.
|
# Ignore unused imports.
|
||||||
# ruff: noqa: F401
|
# ruff: file-ignore[unused-import]
|
||||||
|
|
||||||
from bonsai.tool.aggregate import Aggregate
|
from bonsai.tool.aggregate import Aggregate
|
||||||
from bonsai.tool.array import Array
|
from bonsai.tool.array import Array
|
||||||
|
|||||||
@@ -45,10 +45,10 @@ for dep in dependencies:
|
|||||||
subprocess.check_call(command + [dep])
|
subprocess.check_call(command + [dep])
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import pygments # noqa: F401
|
import pygments # ruff: ignore[unused-import]
|
||||||
import pytest # noqa: F401
|
import pytest # ruff: ignore[unused-import]
|
||||||
import pytest_bdd # noqa: F401
|
import pytest_bdd # ruff: ignore[unused-import]
|
||||||
import pytest_blender # noqa: F401
|
import pytest_blender # ruff: ignore[unused-import]
|
||||||
|
|
||||||
print("Test dependency installation was successful!")
|
print("Test dependency installation was successful!")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ def _has_occ():
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
try:
|
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
|
return True
|
||||||
except ImportError:
|
except ImportError:
|
||||||
@@ -52,6 +52,6 @@ def _has_occ():
|
|||||||
has_occ = _has_occ()
|
has_occ = _has_occ()
|
||||||
|
|
||||||
if 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 *
|
from .main import *
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ import time
|
|||||||
import ifcopenshell.ifcopenshell_wrapper as W
|
import ifcopenshell.ifcopenshell_wrapper as W
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from OCC.Core import AIS # noqa: F401
|
from OCC.Core import AIS # ruff: ignore[unused-import]
|
||||||
|
|
||||||
USE_OCCT_HANDLE = False
|
USE_OCCT_HANDLE = False
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ import ifcopenshell.util.element
|
|||||||
import ifcpatch
|
import ifcpatch
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import sqlite3 # noqa: F401
|
import sqlite3 # ruff: ignore[unused-import]
|
||||||
except:
|
except:
|
||||||
print("No SQLite support")
|
print("No SQLite support")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user