Update python to 3.11 and use StrEnum
Signed-off-by: Egor Savkin <es@m-labs.hk>
This commit is contained in:
parent
5688b2f1bb
commit
9596320423
|
@ -18,16 +18,16 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1641870998,
|
||||
"narHash": "sha256-6HkxR2WZsm37VoQS7jgp6Omd71iw6t1kP8bDbaqCDuI=",
|
||||
"lastModified": 1671313200,
|
||||
"narHash": "sha256-itZTrtHeDJjV696+ur0/TzkTqb5y3Eb57WRLRPK3rwA=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "386234e2a61e1e8acf94dfa3a3d3ca19a6776efb",
|
||||
"rev": "0938d73bb143f4ae037143572f11f4338c7b2d1c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-21.11",
|
||||
"ref": "nixos-22.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
description = "Firmware for the Sinara 8451 Thermostat";
|
||||
|
||||
inputs.nixpkgs.url = github:NixOS/nixpkgs/nixos-21.11;
|
||||
inputs.nixpkgs.url = github:NixOS/nixpkgs/nixos-22.11;
|
||||
inputs.mozilla-overlay = { url = github:mozilla/nixpkgs-mozilla; flake = false; };
|
||||
|
||||
outputs = { self, nixpkgs, mozilla-overlay }:
|
||||
|
@ -70,7 +70,7 @@
|
|||
rustPlatform.rust.rustc
|
||||
rustPlatform.rust.cargo
|
||||
openocd dfu-util
|
||||
] ++ (with python3Packages; [
|
||||
] ++ (with python311Packages; [
|
||||
numpy matplotlib
|
||||
]);
|
||||
};
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import math
|
||||
import logging
|
||||
from collections import deque, namedtuple
|
||||
from enum import Enum
|
||||
from enum import StrEnum
|
||||
|
||||
from pytec.client import Client
|
||||
|
||||
|
@ -11,7 +11,7 @@ from pytec.client import Client
|
|||
# See https://github.com/t0mpr1c3/Arduino-PID-AutoTune-Library
|
||||
|
||||
|
||||
class PIDAutotuneState(Enum):
|
||||
class PIDAutotuneState(StrEnum):
|
||||
STATE_OFF = 'off'
|
||||
STATE_RELAY_STEP_UP = 'relay step up'
|
||||
STATE_RELAY_STEP_DOWN = 'relay step down'
|
||||
|
|
Loading…
Reference in New Issue