Commit bccde40e authored by Gaetano Scandariato's avatar Gaetano Scandariato
Browse files

fix(reporting): resolve all 12 F821 undefined-name warnings

Two pre-existing bugs exposed by ruff linting:

1. PyAETNA/reporting/model_components.py
   - Any used in ModelComponentsConfig dataclass annotations
     but from typing import Any was never present.
   - Fix: add the missing import.

2. PyAETNA/reporting/grid_builder_utils.py
   - GridBuilder class copied from grid_builder.py without its deps.
   - np, _build_lc_train_grid, _build_visit_time_grid all undefined.
   - Fix: add numpy import and import the two private functions
     from the sibling grid_builder module.
parent a9eda959
Loading
Loading
Loading
Loading
Loading
+5 −0
Changes for PyAETNA/reporting/grid_builder_utils.py: 5 added lines, 0 removed lines.
Original line number Diff line number Diff line
import numpy as np

from .grid_builder import _build_lc_train_grid, _build_visit_time_grid


class GridBuilder:
    """
    Orchestrates the construction of time grids for plotting.
+1 −0
Changes for PyAETNA/reporting/model_components.py: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@ save_model_components_binary
"""

from dataclasses import dataclass
from typing import Any

import dill
import jax.numpy as jnp