Fix get_current_pattern method and bump version

This commit is contained in:
Evan Fiordeliso 2023-01-30 12:02:16 -05:00
parent 5820f837a5
commit 9a0e49547e
3 changed files with 4 additions and 4 deletions

View File

@ -42,8 +42,8 @@ class Status:
self.memory: MemoryUsage = memory self.memory: MemoryUsage = memory
self.patterns: list[PatternMeta] = patterns self.patterns: list[PatternMeta] = patterns
def get_current_pattern(self) -> PatternMeta: def get_current_pattern(self) -> PatternMeta | None:
return self.patterns[self.selectedPattern] return self.get_pattern_by_id(self.selectedPattern)
def get_pattern_by_id(self, id: int) -> PatternMeta | None: def get_pattern_by_id(self, id: int) -> PatternMeta | None:
for pattern in self.patterns: for pattern in self.patterns:

View File

@ -1,6 +1,6 @@
[tool.poetry] [tool.poetry]
name = "flickerstrip-py" name = "flickerstrip-py"
version = "0.2.3" version = "0.2.4"
description = "" description = ""
authors = ["Evan Fiordeliso <evan.fiordeliso@gmail.com>"] authors = ["Evan Fiordeliso <evan.fiordeliso@gmail.com>"]

View File

@ -3,7 +3,7 @@ from setuptools import find_packages, setup
setup( setup(
name='flickerstrip-py', name='flickerstrip-py',
packages=find_packages(), packages=find_packages(),
version='0.2.3', version='0.2.4',
description='A python library for interracting with a flickerstrip.', description='A python library for interracting with a flickerstrip.',
author='Evan Fiordeliso <evan.fiordeliso@gmail.com>', author='Evan Fiordeliso <evan.fiordeliso@gmail.com>',
license='MIT', license='MIT',