diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4a424cc..dc5f04b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,18 +1,18 @@ # See https://pre-commit.com for more information # See https://pre-commit.com/hooks.html for more hooks repos: - - repo: https://github.com/psf/black - rev: 25.1.0 + - repo: https://github.com/psf/black-pre-commit-mirror + rev: 26.3.1 hooks: - id: black language_version: python3 files: . - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v5.0.0 + rev: v6.0.0 hooks: - id: check-toml - repo: https://github.com/PyCQA/flake8 - rev: 7.1.2 + rev: 7.3.0 hooks: - id: flake8 language_version: python3 @@ -22,4 +22,4 @@ repos: - id: isort language_version: python3 repo: https://github.com/timothycrosley/isort - rev: 6.0.1 + rev: 8.0.1 diff --git a/src/livemaker/__init__.py b/src/livemaker/__init__.py index 2ca1834..4390624 100644 --- a/src/livemaker/__init__.py +++ b/src/livemaker/__init__.py @@ -16,6 +16,7 @@ # You should have received a copy of the GNU General Public License along with # this program. If not, see . """Top-level package for pylivemaker.""" + from loguru import logger from ._version import __version__, __version_tuple__ # noqa: F401 diff --git a/src/livemaker/lsb/core.py b/src/livemaker/lsb/core.py index 2e17d6e..36631b7 100644 --- a/src/livemaker/lsb/core.py +++ b/src/livemaker/lsb/core.py @@ -590,7 +590,7 @@ def _to(self): # someone finds a script that actually requires supporting it def _plus(self): - (p1, p2) = self.operands + p1, p2 = self.operands if p1.type == ParamType.Var or p2.type == ParamType.Var: return [p1, " + ", p2] elif p1.type == ParamType.Str or p2.type == ParamType.Str: @@ -598,7 +598,7 @@ def _plus(self): return [Param(value=p1.value + p2.value)] def _minus(self): - (p1, p2) = self.operands + p1, p2 = self.operands if p1.type == ParamType.Var or p2.type == ParamType.Var: return [p1, " - ", p2] elif p1.type == ParamType.Str or p2.type == ParamType.Str: @@ -606,7 +606,7 @@ def _minus(self): return [Param(value=p1.value - p2.value)] def _mul(self): - (p1, p2) = self.operands + p1, p2 = self.operands if p1.type == ParamType.Var or p2.type == ParamType.Var: return [p1, " * ", p2] elif p1.type == ParamType.Str or p2.type == ParamType.Str: @@ -614,7 +614,7 @@ def _mul(self): return [Param(value=p1.value * p2.value)] def _div(self): - (p1, p2) = self.operands + p1, p2 = self.operands if p1.type == ParamType.Var or p2.type == ParamType.Var: return [p1, " / ", p2] elif p1.type == ParamType.Str or p2.type == ParamType.Str: @@ -622,7 +622,7 @@ def _div(self): return [Param(value=p1.value / p2.value)] def _mod(self): - (p1, p2) = self.operands + p1, p2 = self.operands if p1.type == ParamType.Var or p2.type == ParamType.Var: return [p1, " % ", p2] elif p1.type == ParamType.Str or p2.type == ParamType.Str: @@ -631,7 +631,7 @@ def _mod(self): def _or(self): # LiveMaker uses | to specify both bitwise and boolean OR - (p1, p2) = self.operands + p1, p2 = self.operands if p1.type == ParamType.Var or p2.type == ParamType.Var: return ["(", p1, " | ", p2, ")"] elif p1.type == ParamType.Str or p2.type == ParamType.Str: @@ -642,7 +642,7 @@ def _or(self): def _and(self): # LiveMaker uses | to specify both bitwise and boolean AND - (p1, p2) = self.operands + p1, p2 = self.operands if p1.type == ParamType.Var or p2.type == ParamType.Var: return ["(", p1, " & ", p2, ")"] elif p1.type == ParamType.Str or p2.type == ParamType.Str: @@ -652,7 +652,7 @@ def _and(self): return [p1.value & p2.value] def _xor(self): - (p1, p2) = self.operands + p1, p2 = self.operands if p1.type == ParamType.Var or p2.type == ParamType.Var: return [p1, " ^ ", p2] elif p1.type == ParamType.Str or p2.type == ParamType.Str: @@ -676,37 +676,37 @@ def _func(self): return x def _equal(self): - (p1, p2) = self.operands + p1, p2 = self.operands if p1.type == ParamType.Var or p2.type == ParamType.Var: return [p1, " == ", p2] return [Param(value=p1.value == p2.value)] def _big(self): - (p1, p2) = self.operands + p1, p2 = self.operands if p1.type == ParamType.Var or p2.type == ParamType.Var: return [p1, " > ", p2] return [Param(value=p1.value > p2.value)] def _small(self): - (p1, p2) = self.operands + p1, p2 = self.operands if p1.type == ParamType.Var or p2.type == ParamType.Var: return [p1, " < ", p2] return [Param(value=p1.value < p2.value)] def _ebig(self): - (p1, p2) = self.operands + p1, p2 = self.operands if p1.type == ParamType.Var or p2.type == ParamType.Var: return [p1, " >= ", p2] return [Param(value=p1.value >= p2.value)] def _esmall(self): - (p1, p2) = self.operands + p1, p2 = self.operands if p1.type == ParamType.Var or p2.type == ParamType.Var: return [p1, " <= ", p2] return [Param(value=p1.value <= p2.value)] def _shiftl(self): - (p1, p2) = self.operands + p1, p2 = self.operands if p1.type == ParamType.Var or p2.type == ParamType.Var: return [p1, " << ", p2] elif p1.type == ParamType.Str or p2.type == ParamType.Str: @@ -714,7 +714,7 @@ def _shiftl(self): return [Param(p1.value << p2.value)] def _shiftr(self): - (p1, p2) = self.operands + p1, p2 = self.operands if p1.type == ParamType.Var or p2.type == ParamType.Var: return [p1, " >> ", p2] elif p1.type == ParamType.Str or p2.type == ParamType.Str: @@ -723,7 +723,7 @@ def _shiftr(self): def _combostr(self): # String join - (p1, p2) = self.operands + p1, p2 = self.operands if p1.type == ParamType.Var or p2.type == ParamType.Var: return [p1, " ++ ", p2] elif p1.type != ParamType.Str or p2.type != ParamType.Str: @@ -731,7 +731,7 @@ def _combostr(self): return [Param(value="".join([p1.value, p2.value]))] def _nequal(self): - (p1, p2) = self.operands + p1, p2 = self.operands if p1.type == ParamType.Var or p2.type == ParamType.Var: return [p1, " != ", p2] return [Param(value=p1.value != p2.value)]