From 6e00ee014c2c1c1a2e178c719926589c7c1ea8ec Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Sat, 28 Mar 2026 11:52:58 +0000 Subject: [PATCH] fix the rollover function patch bump --- pyproject.toml | 8 +++++--- vban_cmd/util.py | 5 +---- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 2f2542d..eaa9878 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "vban-cmd" -version = "2.10.3" +version = "2.10.4" description = "Python interface for the VBAN RT Packet Service (Sendtext)" authors = [{ name = "Onyx and Iris", email = "code@onyxandiris.online" }] license = { text = "MIT" } @@ -91,14 +91,16 @@ target-version = "py310" [tool.ruff.lint] # Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default. +# Enable flake8-errmsg (EM) warnings. +# Enable flake8-bugbear (B) warnings. # Unlike Flake8, Ruff doesn't enable pycodestyle warnings (`W`) or # McCabe complexity (`C901`) by default. -select = ["E4", "E7", "E9", "F"] +select = ["E4", "E7", "E9", "EM", "F", "B"] ignore = [] # Allow fix for all enabled rules (when `--fix`) is provided. fixable = ["ALL"] -unfixable = [] +unfixable = ["B"] # Allow unused variables when underscore-prefixed. dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$" diff --git a/vban_cmd/util.py b/vban_cmd/util.py index fb30284..3fa60c3 100644 --- a/vban_cmd/util.py +++ b/vban_cmd/util.py @@ -147,7 +147,4 @@ def deep_merge(dict1, dict2): def bump_framecounter(framecounter: int) -> int: """Increment framecounter with rollover at 0xFFFFFFFF.""" - if framecounter > 0xFFFFFFFF: - return 0 - else: - return framecounter + 1 + return (framecounter + 1) & 0xFFFFFFFF