From f017e5e6ce1b00bdf5ebb1db8c1fc4878d1b24ac Mon Sep 17 00:00:00 2001 From: dm1sh Date: Tue, 17 Oct 2023 22:49:27 +0300 Subject: [PATCH] Fixed private static method calling in example --- GraphWidget/Graph_example.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/GraphWidget/Graph_example.py b/GraphWidget/Graph_example.py index 19a4964..82d833e 100644 --- a/GraphWidget/Graph_example.py +++ b/GraphWidget/Graph_example.py @@ -2,8 +2,8 @@ import numpy as np import matplotlib.pyplot as plt class GraphStatic: - @staticmethod - def plot(xs: np.ndarray, ys: np.ndarray, params: dict[str, str]) -> plt.Figure: + @classmethod + def plot(cls, xs: np.ndarray, ys: np.ndarray, params: dict[str, str]) -> plt.Figure: """ строим график через """ @@ -13,7 +13,7 @@ class GraphStatic: Все методы при этом статичные """ - GraphStatic.__some_func(1, 2) + cls.__some_func(1, 2) """ И возвращаем Figure