Fix get_current_pattern method and bump version
This commit is contained in:
parent
5820f837a5
commit
9a0e49547e
|
@ -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:
|
||||||
|
|
|
@ -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>"]
|
||||||
|
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -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',
|
||||||
|
|
Loading…
Reference in New Issue