Skip to content
Snippets Groups Projects
Commit 3ddf218b authored by Frederik Hennig's avatar Frederik Hennig
Browse files

code style cleanup

parent 3a49e20e
No related merge requests found
Pipeline #57179 passed with stage
in 3 minutes and 12 seconds
......@@ -4,7 +4,6 @@ from typing import Sequence, Any
from enum import Enum, auto
from dataclasses import dataclass, replace, asdict, InitVar
from argparse import ArgumentParser
from os import path
from importlib import util as iutil
......
......@@ -10,7 +10,7 @@ from pystencils.astnodes import KernelFunction
from .configuration import SfgConfiguration, config_from_commandline, merge_configurations, SfgCodeStyle
from .kernel_namespace import SfgKernelNamespace, SfgKernelHandle
from .tree import SfgCallTreeNode, SfgSequence, SfgKernelCallNode, SfgStatements
from .tree import SfgCallTreeNode, SfgKernelCallNode, SfgStatements
from .tree.deferred_nodes import SfgDeferredFieldMapping
from .tree.builders import SfgBranchBuilder, make_sequence
from .tree.visitors import CollectIncludes
......
......@@ -4,7 +4,7 @@ from pystencils.typing import FieldPointerSymbol, FieldStrideSymbol, FieldShapeS
from ...tree import SfgStatements
from ..source_objects import SrcField, SrcVector
from ..source_objects import SrcObject, TypedSymbolOrObject
from ..source_objects import TypedSymbolOrObject
from ...types import SrcType, PsType, cpp_typename
from ...source_components.header_include import SfgHeaderInclude
from ...exceptions import SfgException
......
from __future__ import annotations
from typing import TYPE_CHECKING
from pystencilssfg.context import SfgContext
if TYPE_CHECKING:
from ..context import SfgContext
from abc import ABC, abstractmethod
from pystencils import Field, TypedSymbol
from pystencils import Field
from pystencils.typing import FieldPointerSymbol, FieldShapeSymbol, FieldStrideSymbol
from ..exceptions import SfgException
......@@ -19,6 +14,9 @@ from .builders import make_sequence
from ..source_concepts import SrcField
from ..source_concepts.source_objects import TypedSymbolOrObject
if TYPE_CHECKING:
from ..context import SfgContext
class SfgDeferredNode(SfgCallTreeNode, ABC):
"""Nodes of this type are inserted as placeholders into the kernel call tree
......
from __future__ import annotations
from typing import Callable, TypeVar, Generic, Any, ParamSpec, Concatenate
from typing import Callable, TypeVar, Generic, ParamSpec
from types import MethodType
from functools import wraps
......@@ -10,6 +10,7 @@ V = TypeVar("V")
R = TypeVar("R")
P = ParamSpec("P")
class VisitorDispatcher(Generic[V, R]):
def __init__(self, wrapped_method: Callable[..., R]):
self._dispatch_dict: dict[type, Callable[..., R]] = {}
......
......@@ -4,8 +4,6 @@ from typing import TYPE_CHECKING
from functools import reduce
from pystencils.typing import TypedSymbol
from .basic_nodes import SfgCallTreeNode, SfgCallTreeLeaf, SfgSequence, SfgStatements
from .deferred_nodes import SfgParamCollectionDeferredNode
from .dispatcher import visitor
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment