diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 616a517..a255dab 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -24,7 +24,7 @@ repos: - id: check-ast - repo: https://github.com/PyCQA/docformatter - rev: v1.7.7 + rev: v1.7.8 hooks: - id: docformatter args: @@ -42,7 +42,7 @@ repos: - id: rst-directive-colons - repo: https://github.com/PyCQA/isort - rev: 8.0.1 + rev: 9.0.0a3 hooks: - id: isort @@ -81,7 +81,7 @@ repos: - id: nbstripout - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.15.9" + rev: "v0.15.20" hooks: - id: ruff types_or: [ python, pyi, jupyter ] diff --git a/src/phasespace/phasespace.py b/src/phasespace/phasespace.py index a01fcae..7bf3df8 100644 --- a/src/phasespace/phasespace.py +++ b/src/phasespace/phasespace.py @@ -185,7 +185,7 @@ def get_mass( @property def has_fixed_mass(self): - """bool: Is the mass a callable function?""" + """Bool: Is the mass a callable function?""" return not callable(self._mass) def set_children(self, *children): @@ -222,12 +222,12 @@ def set_children(self, *children): @property def has_children(self): - """bool: Does the particle have children?""" + """Bool: Does the particle have children?""" return bool(self.children) @property def has_grandchildren(self): - """bool: Does the particle have grandchildren?""" + """Bool: Does the particle have grandchildren?""" if not self.children: return False return any(child.has_children for child in self.children) @@ -754,7 +754,6 @@ def generate_tensor( ValueError: If ``n_events`` and the size of ``boost_to`` don't match. See ``GenParticle.generate_unnormalized``. """ - # Run generation raise RuntimeError( "This function is removed. Use `generate` which does not return a Tensor as well."