fix: Automated ruff fixes.

uv-refactor
Sofus Albert Høgsbro Rose 2024-10-02 13:08:40 +02:00
parent 06ad0d62a5
commit fdcd52e937
Signed by: so-rose
GPG Key ID: AD901CB0F3701434
82 changed files with 28 additions and 103 deletions

View File

@ -20,17 +20,27 @@ repos:
- repo: https://github.com/astral-sh/ruff-pre-commit - repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version. # Ruff version.
rev: v0.4.3 rev: v0.6.8
hooks: hooks:
# ruff lint # ruff lint
#- id: ruff #- id: ruff
# args: [ --fix ] #args: [ --fix ]
# ruff fmt # ruff fmt
- id: ruff-format - id: ruff-format
- repo: https://github.com/commitizen-tools/commitizen - repo: https://github.com/commitizen-tools/commitizen
rev: master rev: v3.29.1
hooks: hooks:
- id: commitizen - id: commitizen
- id: commitizen-branch - id: commitizen-branch
stages: [push] stages: [push]
- repo: local
hooks:
- id: pytest
name: pytest
entry: ./.venv/bin/pytest tests
language: system
types: [python]
pass_filenames: false
always_run: true

View File

@ -126,7 +126,7 @@ def write_modifier_geonodes(
modifier_altered = True modifier_altered = True
## TODO: More fine-grained alterations? ## TODO: More fine-grained alterations?
return modifier_altered # noqa: RET504 return modifier_altered
#################### ####################

View File

@ -38,7 +38,6 @@ Attributes:
""" """
import bpy import bpy
from blender_maxwell.utils import logger as _logger from blender_maxwell.utils import logger as _logger
from . import contracts as ct from . import contracts as ct

View File

@ -41,7 +41,6 @@ import jax.numpy as jnp
import sympy.physics.units as spu import sympy.physics.units as spu
import tidy3d as td import tidy3d as td
import xarray import xarray
from blender_maxwell.utils import bl_cache, logger, sim_symbols from blender_maxwell.utils import bl_cache, logger, sim_symbols
from ... import contracts as ct from ... import contracts as ct

View File

@ -37,7 +37,6 @@ import typing as typ
import bpy import bpy
import sympy as sp import sympy as sp
from blender_maxwell.utils import bl_cache, logger, sim_symbols from blender_maxwell.utils import bl_cache, logger, sim_symbols
from blender_maxwell.utils import sympy_extra as spux from blender_maxwell.utils import sympy_extra as spux

View File

@ -35,7 +35,6 @@
import typing as typ import typing as typ
import bpy import bpy
from blender_maxwell.utils import bl_cache, logger from blender_maxwell.utils import bl_cache, logger
from blender_maxwell.utils import sympy_extra as spux from blender_maxwell.utils import sympy_extra as spux

View File

@ -38,7 +38,6 @@ See `blender_maxwell.maxwell_sim_nodes.math_system` for the actual mathematics i
import typing as typ import typing as typ
import bpy import bpy
from blender_maxwell.utils import bl_cache, logger from blender_maxwell.utils import bl_cache, logger
from blender_maxwell.utils import sympy_extra as spux from blender_maxwell.utils import sympy_extra as spux

View File

@ -39,7 +39,6 @@ import bpy
import jax import jax
import jax.numpy as jnp import jax.numpy as jnp
import numpy as np import numpy as np
from blender_maxwell.utils import bl_cache, logger, sim_symbols from blender_maxwell.utils import bl_cache, logger, sim_symbols
from .... import contracts as ct from .... import contracts as ct

View File

@ -37,7 +37,6 @@ import typing as typ
import bpy import bpy
import sympy as sp import sympy as sp
from blender_maxwell.utils import bl_cache, logger, sim_symbols from blender_maxwell.utils import bl_cache, logger, sim_symbols
from blender_maxwell.utils import sympy_extra as spux from blender_maxwell.utils import sympy_extra as spux

View File

@ -38,10 +38,9 @@ import jaxtyping as jtyp
import matplotlib.axis as mpl_ax import matplotlib.axis as mpl_ax
import sympy as sp import sympy as sp
import sympy.physics.units as spu import sympy.physics.units as spu
from frozendict import frozendict
from blender_maxwell.utils import bl_cache, image_ops, logger, sim_symbols from blender_maxwell.utils import bl_cache, image_ops, logger, sim_symbols
from blender_maxwell.utils import sympy_extra as spux from blender_maxwell.utils import sympy_extra as spux
from frozendict import frozendict
from ... import contracts as ct from ... import contracts as ct
from ... import managed_objs, sockets from ... import managed_objs, sockets

View File

@ -43,7 +43,6 @@ from collections import defaultdict
from types import MappingProxyType from types import MappingProxyType
import bpy import bpy
from blender_maxwell.utils import bl_cache, bl_instance, logger from blender_maxwell.utils import bl_cache, bl_instance, logger
from blender_maxwell.utils import sympy_extra as spux from blender_maxwell.utils import sympy_extra as spux

View File

@ -36,14 +36,11 @@ import typing as typ
import uuid import uuid
from collections import defaultdict from collections import defaultdict
from fractions import Fraction from fractions import Fraction
from types import MappingProxyType
import bpy import bpy
import jax import jax
import numpy as np import numpy as np
import pydantic as pyd import pydantic as pyd
import sympy as sp
from blender_maxwell.utils import logger from blender_maxwell.utils import logger
from blender_maxwell.utils import sympy_extra as spux from blender_maxwell.utils import sympy_extra as spux
from blender_maxwell.utils.frozendict import FrozenDict, frozendict from blender_maxwell.utils.frozendict import FrozenDict, frozendict

View File

@ -36,10 +36,9 @@ import typing as typ
import bpy import bpy
import sympy as sp import sympy as sp
from frozendict import frozendict
from blender_maxwell.utils import bl_cache, sci_constants, sim_symbols from blender_maxwell.utils import bl_cache, sci_constants, sim_symbols
from blender_maxwell.utils import sympy_extra as spux from blender_maxwell.utils import sympy_extra as spux
from frozendict import frozendict
from .... import contracts as ct from .... import contracts as ct
from .... import sockets from .... import sockets

View File

@ -38,7 +38,6 @@ from fractions import Fraction
import bpy import bpy
import sympy as sp import sympy as sp
from blender_maxwell.utils import bl_cache, logger, sim_symbols from blender_maxwell.utils import bl_cache, logger, sim_symbols
from blender_maxwell.utils import sympy_extra as spux from blender_maxwell.utils import sympy_extra as spux

View File

@ -39,7 +39,6 @@ from pathlib import Path
import bpy import bpy
import sympy as sp import sympy as sp
import tidy3d as td import tidy3d as td
from blender_maxwell.utils import bl_cache, logger, sim_symbols from blender_maxwell.utils import bl_cache, logger, sim_symbols
from blender_maxwell.utils import sympy_extra as spux from blender_maxwell.utils import sympy_extra as spux

View File

@ -37,7 +37,6 @@ from pathlib import Path
import bpy import bpy
import tidy3d as td import tidy3d as td
from blender_maxwell.utils import bl_cache, logger from blender_maxwell.utils import bl_cache, logger
from .... import contracts as ct from .... import contracts as ct

View File

@ -37,7 +37,6 @@ import typing as typ
import bpy import bpy
import sympy as sp import sympy as sp
import sympy.physics.units as spu import sympy.physics.units as spu
from blender_maxwell.utils import bl_cache, logger from blender_maxwell.utils import bl_cache, logger
from blender_maxwell.utils import sympy_extra as spux from blender_maxwell.utils import sympy_extra as spux

View File

@ -36,7 +36,6 @@ import typing as typ
import bpy import bpy
import tidy3d as td import tidy3d as td
from blender_maxwell.services import tdcloud from blender_maxwell.services import tdcloud
from blender_maxwell.utils import bl_cache, logger, sim_symbols from blender_maxwell.utils import bl_cache, logger, sim_symbols
from blender_maxwell.utils import sympy_extra as spux from blender_maxwell.utils import sympy_extra as spux

View File

@ -40,11 +40,10 @@ import bpy
import sympy as sp import sympy as sp
import sympy.physics.units as spu import sympy.physics.units as spu
import tidy3d as td import tidy3d as td
from tidy3d.material_library.material_library import MaterialItem as Tidy3DMediumItem
from tidy3d.material_library.material_library import VariantItem as Tidy3DMediumVariant
from blender_maxwell.utils import bl_cache, logger, sci_constants from blender_maxwell.utils import bl_cache, logger, sci_constants
from blender_maxwell.utils import sympy_extra as spux from blender_maxwell.utils import sympy_extra as spux
from tidy3d.material_library.material_library import MaterialItem as Tidy3DMediumItem
from tidy3d.material_library.material_library import VariantItem as Tidy3DMediumVariant
from ... import contracts as ct from ... import contracts as ct
from ... import managed_objs, sockets from ... import managed_objs, sockets

View File

@ -36,7 +36,6 @@ import functools
import typing as typ import typing as typ
import tidy3d as td import tidy3d as td
from blender_maxwell.utils import logger from blender_maxwell.utils import logger
from blender_maxwell.utils import sympy_extra as spux from blender_maxwell.utils import sympy_extra as spux

View File

@ -36,7 +36,6 @@ import typing as typ
import bpy import bpy
import tidy3d as td import tidy3d as td
from blender_maxwell.utils import logger from blender_maxwell.utils import logger
from blender_maxwell.utils import sympy_extra as spux from blender_maxwell.utils import sympy_extra as spux

View File

@ -36,7 +36,6 @@ import typing as typ
import bpy import bpy
import tidy3d as td import tidy3d as td
from blender_maxwell.utils import logger from blender_maxwell.utils import logger
from blender_maxwell.utils import sympy_extra as spux from blender_maxwell.utils import sympy_extra as spux

View File

@ -36,7 +36,6 @@ import bpy
import sympy.physics.units as spu import sympy.physics.units as spu
import tidy3d as td import tidy3d as td
import tidy3d.plugins.dispersion as td_dispersion import tidy3d.plugins.dispersion as td_dispersion
from blender_maxwell.utils import bl_cache, logger from blender_maxwell.utils import bl_cache, logger
from blender_maxwell.utils import sympy_extra as spux from blender_maxwell.utils import sympy_extra as spux

View File

@ -36,7 +36,6 @@ import bpy
import sympy as sp import sympy as sp
import sympy.physics.units as spu import sympy.physics.units as spu
import tidy3d as td import tidy3d as td
from blender_maxwell.assets.geonodes import GeoNodes, import_geonodes from blender_maxwell.assets.geonodes import GeoNodes, import_geonodes
from blender_maxwell.utils import bl_cache, logger from blender_maxwell.utils import bl_cache, logger
from blender_maxwell.utils import sympy_extra as spux from blender_maxwell.utils import sympy_extra as spux

View File

@ -39,7 +39,6 @@ import bpy
import sympy as sp import sympy as sp
import sympy.physics.units as spu import sympy.physics.units as spu
import tidy3d as td import tidy3d as td
from blender_maxwell.assets.geonodes import GeoNodes, import_geonodes from blender_maxwell.assets.geonodes import GeoNodes, import_geonodes
from blender_maxwell.utils import bl_cache, logger from blender_maxwell.utils import bl_cache, logger
from blender_maxwell.utils import sympy_extra as spux from blender_maxwell.utils import sympy_extra as spux

View File

@ -34,7 +34,6 @@ import typing as typ
import sympy as sp import sympy as sp
import tidy3d as td import tidy3d as td
from blender_maxwell.assets.geonodes import GeoNodes, import_geonodes from blender_maxwell.assets.geonodes import GeoNodes, import_geonodes
from blender_maxwell.utils import logger from blender_maxwell.utils import logger
from blender_maxwell.utils import sympy_extra as spux from blender_maxwell.utils import sympy_extra as spux

View File

@ -34,7 +34,6 @@ import typing as typ
from pathlib import Path from pathlib import Path
import bpy import bpy
from blender_maxwell.utils import bl_cache, logger from blender_maxwell.utils import bl_cache, logger
from blender_maxwell.utils import sympy_extra as spux from blender_maxwell.utils import sympy_extra as spux

View File

@ -115,11 +115,10 @@ class JSONFileExporterNode(base.MaxwellSimNode):
return data.json() return data.json()
# Pydantic Models: Call .model_dump_json() # Pydantic Models: Call .model_dump_json()
elif isinstance(data, pyd.BaseModel): if isinstance(data, pyd.BaseModel):
return data.model_dump_json() return data.model_dump_json()
else: json.dumps(data)
json.dumps(data)
#################### ####################

View File

@ -35,7 +35,6 @@ import typing as typ
import bpy import bpy
import sympy as sp import sympy as sp
import tidy3d as td import tidy3d as td
from blender_maxwell.utils import bl_cache, logger from blender_maxwell.utils import bl_cache, logger
from blender_maxwell.utils import sympy_extra as spux from blender_maxwell.utils import sympy_extra as spux

View File

@ -36,7 +36,6 @@ import typing as typ
import bpy import bpy
import tidy3d as td import tidy3d as td
from blender_maxwell.services import tdcloud from blender_maxwell.services import tdcloud
from blender_maxwell.utils import bl_cache, logger, sim_symbols from blender_maxwell.utils import bl_cache, logger, sim_symbols

View File

@ -37,7 +37,6 @@ import typing as typ
import bpy import bpy
import sympy as sp import sympy as sp
import tidy3d as td import tidy3d as td
from blender_maxwell.utils import logger from blender_maxwell.utils import logger
from blender_maxwell.utils import sympy_extra as spux from blender_maxwell.utils import sympy_extra as spux

View File

@ -36,7 +36,6 @@ import typing as typ
import bpy import bpy
import tidy3d as td import tidy3d as td
from blender_maxwell.utils import bl_cache, logger from blender_maxwell.utils import bl_cache, logger
from .... import contracts as ct from .... import contracts as ct

View File

@ -37,7 +37,6 @@ import typing as typ
import bpy import bpy
import sympy as sp import sympy as sp
import tidy3d as td import tidy3d as td
from blender_maxwell.utils import logger from blender_maxwell.utils import logger
from blender_maxwell.utils import sympy_extra as spux from blender_maxwell.utils import sympy_extra as spux

View File

@ -35,7 +35,6 @@
import typing as typ import typing as typ
import tidy3d as td import tidy3d as td
from blender_maxwell.utils import logger from blender_maxwell.utils import logger
from ... import contracts as ct from ... import contracts as ct

View File

@ -36,12 +36,9 @@ import itertools
import typing as typ import typing as typ
import bpy import bpy
import jax
import numpy as np
import sympy as sp import sympy as sp
import sympy.physics.units as spu import sympy.physics.units as spu
import tidy3d as td import tidy3d as td
from blender_maxwell.utils import bl_cache, logger, sim_symbols from blender_maxwell.utils import bl_cache, logger, sim_symbols
from blender_maxwell.utils import sympy_extra as spux from blender_maxwell.utils import sympy_extra as spux
from blender_maxwell.utils.frozendict import frozendict from blender_maxwell.utils.frozendict import frozendict

View File

@ -36,7 +36,6 @@ import typing as typ
import sympy as sp import sympy as sp
import sympy.physics.units as spu import sympy.physics.units as spu
from blender_maxwell.assets.geonodes import GeoNodes, import_geonodes from blender_maxwell.assets.geonodes import GeoNodes, import_geonodes
from blender_maxwell.utils import logger from blender_maxwell.utils import logger
from blender_maxwell.utils import sympy_extra as spux from blender_maxwell.utils import sympy_extra as spux

View File

@ -36,7 +36,6 @@ import typing as typ
import sympy.physics.units as spu import sympy.physics.units as spu
import tidy3d as td import tidy3d as td
from blender_maxwell.utils import logger from blender_maxwell.utils import logger
from ... import contracts as ct from ... import contracts as ct

View File

@ -36,7 +36,6 @@ import typing as typ
import sympy.physics.units as spu import sympy.physics.units as spu
import tidy3d as td import tidy3d as td
from blender_maxwell.utils import logger from blender_maxwell.utils import logger
from .... import contracts as ct from .... import contracts as ct

View File

@ -36,7 +36,6 @@ import typing as typ
import sympy.physics.units as spu import sympy.physics.units as spu
import tidy3d as td import tidy3d as td
from blender_maxwell.utils import logger from blender_maxwell.utils import logger
from .... import contracts as ct from .... import contracts as ct

View File

@ -35,7 +35,6 @@
import typing as typ import typing as typ
import bpy import bpy
from blender_maxwell.services import tdcloud from blender_maxwell.services import tdcloud
from blender_maxwell.utils import bl_cache, logger from blender_maxwell.utils import bl_cache, logger
from blender_maxwell.utils import sympy_extra as spux from blender_maxwell.utils import sympy_extra as spux

View File

@ -38,7 +38,6 @@ import typing as typ
import bpy import bpy
import sympy as sp import sympy as sp
import tidy3d as td import tidy3d as td
from blender_maxwell.utils import bl_cache, logger from blender_maxwell.utils import bl_cache, logger
from blender_maxwell.utils import sympy_extra as spux from blender_maxwell.utils import sympy_extra as spux
from blender_maxwell.utils.frozendict import frozendict from blender_maxwell.utils.frozendict import frozendict

View File

@ -37,7 +37,6 @@ import typing as typ
import bpy import bpy
import sympy as sp import sympy as sp
import tidy3d as td import tidy3d as td
from blender_maxwell.assets.geonodes import GeoNodes, import_geonodes from blender_maxwell.assets.geonodes import GeoNodes, import_geonodes
from blender_maxwell.utils import bl_cache, logger from blender_maxwell.utils import bl_cache, logger
from blender_maxwell.utils import sympy_extra as spux from blender_maxwell.utils import sympy_extra as spux

View File

@ -35,7 +35,6 @@
import typing as typ import typing as typ
import tidy3d as td import tidy3d as td
from blender_maxwell.utils import bl_cache, logger from blender_maxwell.utils import bl_cache, logger
from blender_maxwell.utils import sympy_extra as spux from blender_maxwell.utils import sympy_extra as spux
from blender_maxwell.utils.frozendict import frozendict from blender_maxwell.utils.frozendict import frozendict

View File

@ -37,7 +37,6 @@ import typing as typ
import bpy import bpy
import sympy as sp import sympy as sp
import tidy3d as td import tidy3d as td
from blender_maxwell.assets.geonodes import GeoNodes, import_geonodes from blender_maxwell.assets.geonodes import GeoNodes, import_geonodes
from blender_maxwell.utils import bl_cache, logger from blender_maxwell.utils import bl_cache, logger
from blender_maxwell.utils import sympy_extra as spux from blender_maxwell.utils import sympy_extra as spux

View File

@ -37,7 +37,6 @@ import typing as typ
import bpy import bpy
import sympy as sp import sympy as sp
import tidy3d as td import tidy3d as td
from blender_maxwell.assets.geonodes import GeoNodes, import_geonodes from blender_maxwell.assets.geonodes import GeoNodes, import_geonodes
from blender_maxwell.utils import bl_cache, logger from blender_maxwell.utils import bl_cache, logger
from blender_maxwell.utils import sympy_extra as spux from blender_maxwell.utils import sympy_extra as spux

View File

@ -40,14 +40,13 @@ import numpy as np
import sympy as sp import sympy as sp
import sympy.physics.units as spu import sympy.physics.units as spu
import tidy3d as td import tidy3d as td
from blender_maxwell.utils import bl_cache, logger, sim_symbols
from blender_maxwell.utils import sympy_extra as spux
from tidy3d.components.data.data_array import TimeDataArray as td_TimeDataArray from tidy3d.components.data.data_array import TimeDataArray as td_TimeDataArray
from tidy3d.components.data.dataset import TimeDataset as td_TimeDataset from tidy3d.components.data.dataset import TimeDataset as td_TimeDataset
from blender_maxwell.utils import bl_cache, logger, sim_symbols
from blender_maxwell.utils import sympy_extra as spux
from ... import contracts as ct from ... import contracts as ct
from ... import managed_objs, sockets from ... import sockets
from .. import base, events from .. import base, events
log = logger.get(__name__) log = logger.get(__name__)

View File

@ -38,7 +38,6 @@ import typing as typ
import sympy as sp import sympy as sp
import sympy.physics.units as spu import sympy.physics.units as spu
import tidy3d as td import tidy3d as td
from blender_maxwell.utils import logger from blender_maxwell.utils import logger
from blender_maxwell.utils import sympy_extra as spux from blender_maxwell.utils import sympy_extra as spux

View File

@ -37,7 +37,6 @@ import typing as typ
import sympy as sp import sympy as sp
import sympy.physics.units as spu import sympy.physics.units as spu
import tidy3d as td import tidy3d as td
from blender_maxwell.assets.geonodes import GeoNodes, import_geonodes from blender_maxwell.assets.geonodes import GeoNodes, import_geonodes
from blender_maxwell.utils import logger from blender_maxwell.utils import logger
from blender_maxwell.utils import sympy_extra as spux from blender_maxwell.utils import sympy_extra as spux

View File

@ -37,7 +37,6 @@ import typing as typ
import sympy as sp import sympy as sp
import sympy.physics.units as spu import sympy.physics.units as spu
import tidy3d as td import tidy3d as td
from blender_maxwell.assets.geonodes import GeoNodes, import_geonodes from blender_maxwell.assets.geonodes import GeoNodes, import_geonodes
from blender_maxwell.utils import logger from blender_maxwell.utils import logger
from blender_maxwell.utils import sympy_extra as spux from blender_maxwell.utils import sympy_extra as spux

View File

@ -37,7 +37,6 @@ import typing as typ
import sympy as sp import sympy as sp
import sympy.physics.units as spu import sympy.physics.units as spu
import tidy3d as td import tidy3d as td
from blender_maxwell.assets.geonodes import GeoNodes, import_geonodes from blender_maxwell.assets.geonodes import GeoNodes, import_geonodes
from blender_maxwell.utils import logger from blender_maxwell.utils import logger
from blender_maxwell.utils import sympy_extra as spux from blender_maxwell.utils import sympy_extra as spux

View File

@ -35,7 +35,6 @@ import typing as typ
import bpy import bpy
import sympy as sp import sympy as sp
from blender_maxwell.utils import bl_cache, logger from blender_maxwell.utils import bl_cache, logger
from ... import contracts as ct from ... import contracts as ct

View File

@ -33,11 +33,7 @@
import typing as typ import typing as typ
import bpy import bpy
import sympy as sp
import tidy3d as td
from blender_maxwell.utils import bl_cache, logger from blender_maxwell.utils import bl_cache, logger
from blender_maxwell.utils import sympy_extra as spux
from ... import contracts as ct from ... import contracts as ct
from ... import sockets from ... import sockets

View File

@ -38,7 +38,6 @@ import bpy
import jax.numpy as jnp import jax.numpy as jnp
import sympy as sp import sympy as sp
import sympy.physics.units as spu import sympy.physics.units as spu
from blender_maxwell.utils import bl_cache, logger, sci_constants, sim_symbols from blender_maxwell.utils import bl_cache, logger, sci_constants, sim_symbols
from blender_maxwell.utils import sympy_extra as spux from blender_maxwell.utils import sympy_extra as spux

View File

@ -35,7 +35,6 @@ import typing as typ
import bpy import bpy
import pydantic as pyd import pydantic as pyd
from blender_maxwell.utils import bl_cache, bl_instance, logger, serialize from blender_maxwell.utils import bl_cache, bl_instance, logger, serialize
from .. import contracts as ct from .. import contracts as ct

View File

@ -31,7 +31,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
import bpy import bpy
from blender_maxwell.utils import bl_cache from blender_maxwell.utils import bl_cache
from ... import contracts as ct from ... import contracts as ct

View File

@ -33,7 +33,6 @@
from pathlib import Path from pathlib import Path
import bpy import bpy
from blender_maxwell.utils import bl_cache, logger from blender_maxwell.utils import bl_cache, logger
from ... import contracts as ct from ... import contracts as ct

View File

@ -31,7 +31,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
import bpy import bpy
from blender_maxwell.utils import bl_cache from blender_maxwell.utils import bl_cache
from ... import contracts as ct from ... import contracts as ct

View File

@ -31,7 +31,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
import bpy import bpy
from blender_maxwell.utils import bl_cache, logger from blender_maxwell.utils import bl_cache, logger
from ... import contracts as ct from ... import contracts as ct

View File

@ -31,8 +31,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
import bpy import bpy
from blender_maxwell.utils import bl_cache
from blender_maxwell.utils import bl_cache, logger
from ... import contracts as ct from ... import contracts as ct
from .. import base from .. import base

View File

@ -31,8 +31,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
import bpy import bpy
from blender_maxwell.utils import bl_cache
from blender_maxwell.utils import bl_cache, logger
from ... import contracts as ct from ... import contracts as ct
from .. import base from .. import base

View File

@ -31,7 +31,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
import bpy import bpy
from blender_maxwell.utils import bl_cache, logger from blender_maxwell.utils import bl_cache, logger
from ... import contracts as ct from ... import contracts as ct

View File

@ -31,7 +31,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
import bpy import bpy
from blender_maxwell.utils import bl_cache, logger from blender_maxwell.utils import bl_cache, logger
from ... import contracts as ct from ... import contracts as ct

View File

@ -38,7 +38,6 @@ import typing as typ
import bpy import bpy
import pydantic as pyd import pydantic as pyd
import sympy as sp import sympy as sp
from blender_maxwell.utils import bl_cache, logger, sim_symbols from blender_maxwell.utils import bl_cache, logger, sim_symbols
from blender_maxwell.utils import sympy_extra as spux from blender_maxwell.utils import sympy_extra as spux
from blender_maxwell.utils.frozendict import frozendict from blender_maxwell.utils.frozendict import frozendict

View File

@ -33,7 +33,6 @@
import bpy import bpy
import pydantic as pyd import pydantic as pyd
import tidy3d as td import tidy3d as td
from blender_maxwell.utils import bl_cache, logger from blender_maxwell.utils import bl_cache, logger
from ... import contracts as ct from ... import contracts as ct

View File

@ -34,7 +34,6 @@
import bpy import bpy
import tidy3d as td import tidy3d as td
from blender_maxwell.utils import bl_cache, logger from blender_maxwell.utils import bl_cache, logger
from ... import contracts as ct from ... import contracts as ct

View File

@ -30,7 +30,6 @@
# You should have received a copy of the GNU Affero General Public License # You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
import typing as typ
from ... import contracts as ct from ... import contracts as ct
from .. import base from .. import base

View File

@ -35,7 +35,6 @@ import scipy as sc
import sympy as sp import sympy as sp
import sympy.physics.units as spu import sympy.physics.units as spu
import tidy3d as td import tidy3d as td
from blender_maxwell.utils import bl_cache, logger, sim_symbols from blender_maxwell.utils import bl_cache, logger, sim_symbols
from blender_maxwell.utils import sympy_extra as spux from blender_maxwell.utils import sympy_extra as spux

View File

@ -30,7 +30,6 @@
# You should have received a copy of the GNU Affero General Public License # You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
import typing as typ
from ... import contracts as ct from ... import contracts as ct
from .. import base from .. import base

View File

@ -32,7 +32,6 @@
import bpy import bpy
import tidy3d as td import tidy3d as td
from blender_maxwell.utils import bl_cache, logger from blender_maxwell.utils import bl_cache, logger
from ... import contracts as ct from ... import contracts as ct

View File

@ -34,7 +34,6 @@ import bpy
import sympy as sp import sympy as sp
import sympy.physics.optics.polarization as spo_pol import sympy.physics.optics.polarization as spo_pol
import sympy.physics.units as spu import sympy.physics.units as spu
from blender_maxwell.utils import sympy_extra as spux from blender_maxwell.utils import sympy_extra as spux
from ... import contracts as ct from ... import contracts as ct

View File

@ -35,7 +35,6 @@
import enum import enum
import bpy import bpy
from blender_maxwell.services import tdcloud from blender_maxwell.services import tdcloud
from blender_maxwell.utils import bl_cache from blender_maxwell.utils import bl_cache

View File

@ -16,7 +16,6 @@
import dataclasses import dataclasses
import typing as typ import typing as typ
from types import MappingProxyType
from ..socket_types import SocketType from ..socket_types import SocketType
from .flow_kinds import FlowKind from .flow_kinds import FlowKind

View File

@ -36,7 +36,6 @@ import typing as typ
import jax.lax as jlax import jax.lax as jlax
import jax.numpy as jnp import jax.numpy as jnp
from blender_maxwell.utils import logger, sim_symbols from blender_maxwell.utils import logger, sim_symbols
from .. import contracts as ct from .. import contracts as ct
@ -158,7 +157,7 @@ class FilterOperation(enum.StrEnum):
## -> Mathematically valid (I suppose) for 2. But not so useful. ## -> Mathematically valid (I suppose) for 2. But not so useful.
# if any( # if any(
# (dim.has_idx_discrete(dim) or dim.has_idx_labels(dim)) # (dim.has_idx_discrete(dim) or dim.has_idx_labels(dim))
# and len(dim_idx) > 5 # noqa: PLR2004 # and len(dim_idx) > 5
# for dim, dim_idx in info.dims.items() # for dim, dim_idx in info.dims.items()
# ): # ):
# ops += [FO.ZScore15, FO.ZScore30] # ops += [FO.ZScore15, FO.ZScore30]

View File

@ -39,7 +39,6 @@ import jax.numpy as jnp
import jaxtyping as jtyp import jaxtyping as jtyp
import sympy as sp import sympy as sp
import sympy.physics.units as spu import sympy.physics.units as spu
from blender_maxwell.utils import logger, sim_symbols from blender_maxwell.utils import logger, sim_symbols
from blender_maxwell.utils import sympy_extra as spux from blender_maxwell.utils import sympy_extra as spux

View File

@ -39,7 +39,6 @@ import typing as typ
import jax.numpy as jnp import jax.numpy as jnp
import sympy as sp import sympy as sp
import sympy.physics.units as spu import sympy.physics.units as spu
from blender_maxwell.utils import logger, sim_symbols from blender_maxwell.utils import logger, sim_symbols
from blender_maxwell.utils import sympy_extra as spux from blender_maxwell.utils import sympy_extra as spux
@ -76,7 +75,7 @@ PT = spux.PhysicalType
# for ax_l, ax_r in itertools.zip_longest( # for ax_l, ax_r in itertools.zip_longest(
# expanded_shape_l, expanded_shape_r, fillvalue=1 # expanded_shape_l, expanded_shape_r, fillvalue=1
# ): # ):
# if ax_l == 1 or ax_r == 1 or ax_l == ax_r: # noqa: PLR1714 # if ax_l == 1 or ax_r == 1 or ax_l == ax_r:
# new_shape.append(max([ax_l, ax_r])) # new_shape.append(max([ax_l, ax_r]))
# else: # else:
# return None # return None

View File

@ -36,7 +36,6 @@ import typing as typ
import jax.numpy as jnp import jax.numpy as jnp
import jaxtyping as jtyp import jaxtyping as jtyp
import sympy as sp import sympy as sp
from blender_maxwell.utils import logger, sim_symbols from blender_maxwell.utils import logger, sim_symbols
from blender_maxwell.utils import sympy_extra as spux from blender_maxwell.utils import sympy_extra as spux

View File

@ -36,7 +36,6 @@ import typing as typ
import jax.numpy as jnp import jax.numpy as jnp
import jaxtyping as jtyp import jaxtyping as jtyp
import sympy as sp import sympy as sp
from blender_maxwell.utils import logger, sci_constants, sim_symbols from blender_maxwell.utils import logger, sci_constants, sim_symbols
from blender_maxwell.utils import sympy_extra as spux from blender_maxwell.utils import sympy_extra as spux

View File

@ -50,6 +50,7 @@ from blender_maxwell.utils import logger, sim_symbols
from blender_maxwell.utils import sympy_extra as spux from blender_maxwell.utils import sympy_extra as spux
from .flow_kinds.info import InfoFlow from .flow_kinds.info import InfoFlow
## TODO: Use a Protocol interface from data_pipelines/ ## TODO: Use a Protocol interface from data_pipelines/
log = logger.get(__name__) log = logger.get(__name__)

View File

@ -40,7 +40,6 @@ from fractions import Fraction
import jax import jax
import jaxtyping as jtyp import jaxtyping as jtyp
import sympy as sp import sympy as sp
from blender_maxwell import contracts as ct from blender_maxwell import contracts as ct
from .. import logger from .. import logger

View File

@ -34,7 +34,6 @@ import enum
import typing as typ import typing as typ
import sympy as sp import sympy as sp
from blender_maxwell import contracts as ct from blender_maxwell import contracts as ct

View File

@ -37,7 +37,6 @@ import functools
import typing as typ import typing as typ
import sympy.physics.units as spu import sympy.physics.units as spu
from blender_maxwell import contracts as ct from blender_maxwell import contracts as ct
from ..staticproperty import staticproperty from ..staticproperty import staticproperty

View File

@ -30,7 +30,6 @@
# You should have received a copy of the GNU Affero General Public License # You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
import typing as typ
import sympy as sp import sympy as sp
import sympy.physics.units as spu import sympy.physics.units as spu