kopia lustrzana https://github.com/corrscope/corrscope
Switch color types to str or Optional
rodzic
d52f68a875
commit
53b4f64a87
|
@ -1,5 +1,5 @@
|
|||
from os.path import abspath
|
||||
from typing import TYPE_CHECKING, Any, Optional
|
||||
from typing import TYPE_CHECKING, Optional
|
||||
|
||||
from ovgenpy.config import register_config, Alias
|
||||
from ovgenpy.util import coalesce
|
||||
|
@ -21,7 +21,7 @@ class ChannelConfig:
|
|||
render_width: Optional[int] = None
|
||||
|
||||
ampl_ratio: float = 1.0 # TODO use amplification = None instead?
|
||||
line_color: Any = None # FIXME Optional[str]
|
||||
line_color: Optional[str] = None
|
||||
|
||||
# region Legacy Fields
|
||||
trigger_width_ratio = Alias('trigger_width')
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
from abc import ABC, abstractmethod
|
||||
from typing import Optional, List, TYPE_CHECKING, Any
|
||||
from typing import Optional, List, TYPE_CHECKING
|
||||
|
||||
import matplotlib
|
||||
import numpy as np
|
||||
|
@ -36,8 +36,8 @@ class RendererConfig:
|
|||
width: int
|
||||
height: int
|
||||
|
||||
bg_color: Any = 'black' # FIXME Optional[str]
|
||||
init_line_color: Any = default_color() # FIXME Optional[str]
|
||||
bg_color: str = 'black'
|
||||
init_line_color: str = default_color()
|
||||
line_width: Optional[float] = None
|
||||
|
||||
create_window: bool = False
|
||||
|
@ -45,7 +45,7 @@ class RendererConfig:
|
|||
|
||||
@attr.dataclass
|
||||
class LineParam:
|
||||
color: Any = None
|
||||
color: str
|
||||
|
||||
|
||||
class Renderer(ABC):
|
||||
|
|
Ładowanie…
Reference in New Issue