build(deps-dev): bump flake8-bugbear from 24.12.12 to 25.10.21 (#2773)

* build(deps-dev): bump flake8-bugbear from 24.12.12 to 25.10.21

Bumps [flake8-bugbear](https://github.com/PyCQA/flake8-bugbear) from 24.12.12 to 25.10.21.
- [Release notes](https://github.com/PyCQA/flake8-bugbear/releases)
- [Commits](https://github.com/PyCQA/flake8-bugbear/compare/24.12.12...25.10.21)

---
updated-dependencies:
- dependency-name: flake8-bugbear
  dependency-version: 25.10.21
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix flake8 raised bugs

* use super

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mr-tz <moritz.raabe@mandiant.com>
Co-authored-by: Moritz <mr-tz@users.noreply.github.com>
This commit is contained in:
dependabot[bot]
2025-12-04 10:19:16 -07:00
committed by GitHub
parent d17264c928
commit 9b42b45d21
3 changed files with 5 additions and 13 deletions

View File

@@ -392,6 +392,7 @@ class ShouldExitError(Exception):
"""raised when a main-related routine indicates the program should exit.""" """raised when a main-related routine indicates the program should exit."""
def __init__(self, status_code: int): def __init__(self, status_code: int):
super().__init__(status_code)
self.status_code = status_code self.status_code = status_code

View File

@@ -274,12 +274,8 @@ SUPPORTED_FEATURES[Scope.FUNCTION].update(SUPPORTED_FEATURES[Scope.BASIC_BLOCK])
class InvalidRule(ValueError): class InvalidRule(ValueError):
def __init__(self, msg):
super().__init__()
self.msg = msg
def __str__(self): def __str__(self):
return f"invalid rule: {self.msg}" return f"invalid rule: {super().__str__()}"
def __repr__(self): def __repr__(self):
return str(self) return str(self)
@@ -289,20 +285,15 @@ class InvalidRuleWithPath(InvalidRule):
def __init__(self, path, msg): def __init__(self, path, msg):
super().__init__(msg) super().__init__(msg)
self.path = path self.path = path
self.msg = msg
self.__cause__ = None self.__cause__ = None
def __str__(self): def __str__(self):
return f"invalid rule: {self.path}: {self.msg}" return f"invalid rule: {self.path}: {super(InvalidRule, self).__str__()}"
class InvalidRuleSet(ValueError): class InvalidRuleSet(ValueError):
def __init__(self, msg):
super().__init__()
self.msg = msg
def __str__(self): def __str__(self):
return f"invalid rule set: {self.msg}" return f"invalid rule set: {super().__str__()}"
def __repr__(self): def __repr__(self):
return str(self) return str(self)

View File

@@ -127,7 +127,7 @@ dev = [
"pytest-sugar==1.1.1", "pytest-sugar==1.1.1",
"pytest-instafail==0.5.0", "pytest-instafail==0.5.0",
"flake8==7.3.0", "flake8==7.3.0",
"flake8-bugbear==24.12.12", "flake8-bugbear==25.10.21",
"flake8-encodings==0.5.1", "flake8-encodings==0.5.1",
"flake8-comprehensions==3.17.0", "flake8-comprehensions==3.17.0",
"flake8-logging-format==0.9.0", "flake8-logging-format==0.9.0",