Skip to content

Commit 323edf1

Browse files
committed
remove pylint warnings
1 parent fca0cfc commit 323edf1

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

custom_components/weishaupt_modbus/kennfeld.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
import numpy as np
66
from numpy.polynomial import Chebyshev
7+
# from scipy.interpolate import CubicSpline
78

89
from .const import CONST
910

@@ -75,14 +76,14 @@ def __init__(self) -> None:
7576
# try to load values from json file
7677

7778
try:
78-
openfile = open(CONST.KENNFELDFILE, "r")
79+
openfile = open(CONST.KENNFELDFILE, "r", encoding="utf-8")
7980
except IOError:
8081
kennfeld = {
8182
"known_x": self.known_x,
8283
"known_y": self.known_y,
8384
"known_t": self.known_t,
8485
}
85-
with open(CONST.KENNFELDFILE, "w") as outfile:
86+
with open(CONST.KENNFELDFILE, "w", encoding="utf-8") as outfile:
8687
json.dump(kennfeld, outfile)
8788
else:
8889
json_object = json.load(openfile)
@@ -121,9 +122,6 @@ def __init__(self) -> None:
121122

122123
def map(self, x, y):
123124
"""Map."""
124-
numrows = len(self.max_power) # 3 rows in your example
125-
126-
numcols = len(self.max_power[0]) # 2 columns in your example
127125
x = x - self.known_x[0]
128126
if x < 0:
129127
x = 0
@@ -140,9 +138,9 @@ def map(self, x, y):
140138

141139
# map = PowerMap()
142140

143-
# plt.plot(t,np.transpose(map.max_power))
144-
# plt.ylabel('Max Power')
145-
# plt.xlabel('°C')
141+
# plt.plot(t, np.transpose(map.max_power))
142+
# plt.ylabel("Max Power")
143+
# plt.xlabel("°C")
146144
# plt.show()
147145

148146
# kennfeld = {'known_x': map.known_x,

0 commit comments

Comments
 (0)