From dd35ab789c9901bf9733311e1f6088beee9654b1 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 26 Nov 2024 12:02:05 +0100 Subject: [PATCH] chore(deps): update pre-commit hooks (#641) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(deps): update pre-commit hooks updates: - [github.com/astral-sh/ruff-pre-commit: v0.7.4 → v0.8.0](https://github.com/astral-sh/ruff-pre-commit/compare/v0.7.4...v0.8.0) * style: pre-commit fixes --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- src/particle/__init__.py | 4 ++-- src/particle/converters/__init__.py | 4 ++-- src/particle/lhcb/__init__.py | 2 +- src/particle/particle/__init__.py | 10 ++++----- src/particle/particle/convert.py | 2 +- src/particle/particle/particle.py | 2 +- src/particle/pdgid/__init__.py | 32 ++++++++++++++--------------- src/particle/typing.py | 2 +- 9 files changed, 30 insertions(+), 30 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 95540b3a..02b7120c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -19,7 +19,7 @@ repos: - id: end-of-file-fixer - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.7.4" + rev: "v0.8.0" hooks: - id: ruff args: ["--fix", "--show-fixes"] diff --git a/src/particle/__init__.py b/src/particle/__init__.py index 273f9dc4..37fdafbb 100644 --- a/src/particle/__init__.py +++ b/src/particle/__init__.py @@ -37,22 +37,22 @@ sys.modules["particle.literals"] = literals __all__ = ( + "PDGID", "Charge", "Corsika7ID", "Geant3ID", "Inv", "InvalidParticle", - "PDGID", "Parity", "Particle", "ParticleNotFound", "PythiaID", "SpinType", "Status", + "__version__", "latex_to_html_name", "lifetime_to_width", "width_to_lifetime", - "__version__", ) diff --git a/src/particle/converters/__init__.py b/src/particle/converters/__init__.py index bbd52f2b..23128896 100644 --- a/src/particle/converters/__init__.py +++ b/src/particle/converters/__init__.py @@ -12,12 +12,12 @@ from .pythia import Pythia2PDGIDBiMap __all__ = ( + "Corsika72PDGIDBiMap", "EvtGen2PDGNameMap", "EvtGenName2PDGIDBiMap", - "PDG2EvtGenNameMap", "Geant2PDGIDBiMap", + "PDG2EvtGenNameMap", "Pythia2PDGIDBiMap", - "Corsika72PDGIDBiMap", ) diff --git a/src/particle/lhcb/__init__.py b/src/particle/lhcb/__init__.py index 5256e81d..b904820c 100644 --- a/src/particle/lhcb/__init__.py +++ b/src/particle/lhcb/__init__.py @@ -9,9 +9,9 @@ from .functions import from_lhcb_name, to_lhcb_name __all__ = ( + "LHCbName2PDGIDBiMap", "from_lhcb_name", "to_lhcb_name", - "LHCbName2PDGIDBiMap", ) diff --git a/src/particle/particle/__init__.py b/src/particle/particle/__init__.py index b27677ba..57991a58 100644 --- a/src/particle/particle/__init__.py +++ b/src/particle/particle/__init__.py @@ -14,17 +14,17 @@ __all__ = ( "Charge", "Inv", - "Parity", - "SpinType", - "Status", - "lifetime_to_width", - "width_to_lifetime", "InvalidParticle", + "Parity", "Particle", "ParticleNotFound", + "SpinType", + "Status", "latex_name_unicode", "latex_to_html_name", + "lifetime_to_width", "programmatic_name", + "width_to_lifetime", ) diff --git a/src/particle/particle/convert.py b/src/particle/particle/convert.py index d70e11d7..2064d9b8 100644 --- a/src/particle/particle/convert.py +++ b/src/particle/particle/convert.py @@ -80,9 +80,9 @@ __all__ = ( "convert", + "get_from_latex", "get_from_pdg_extended", "get_from_pdg_mcd", - "get_from_latex", "update_from_mcd", ) diff --git a/src/particle/particle/particle.py b/src/particle/particle/particle.py index e8ccd8fe..78386e1e 100644 --- a/src/particle/particle/particle.py +++ b/src/particle/particle/particle.py @@ -35,7 +35,7 @@ from .kinematics import width_to_lifetime from .utilities import latex_to_html_name, programmatic_name, str_with_unc -__all__ = ("Particle", "ParticleNotFound", "InvalidParticle") +__all__ = ("InvalidParticle", "Particle", "ParticleNotFound") def __dir__() -> tuple[str, ...]: diff --git a/src/particle/pdgid/__init__.py b/src/particle/pdgid/__init__.py index 95fbfc85..ca2400cf 100644 --- a/src/particle/pdgid/__init__.py +++ b/src/particle/pdgid/__init__.py @@ -105,8 +105,20 @@ __all__ = ( "PDGID", - "is_valid", + "A", + "J", + "L", + "S", + "Z", "abspid", + "charge", + "has_bottom", + "has_charm", + "has_down", + "has_fundamental_anti", + "has_strange", + "has_top", + "has_up", "is_Qball", "is_Rhadron", "is_SUSY", @@ -127,23 +139,11 @@ "is_sm_quark", "is_special_particle", "is_technicolor", - "has_down", - "has_up", - "has_strange", - "has_charm", - "has_bottom", - "has_top", - "has_fundamental_anti", - "charge", - "three_charge", + "is_valid", "j_spin", - "J", - "s_spin", - "S", "l_spin", - "L", - "A", - "Z", + "s_spin", + "three_charge", ) diff --git a/src/particle/typing.py b/src/particle/typing.py index 16f99941..e6fa39a1 100644 --- a/src/particle/typing.py +++ b/src/particle/typing.py @@ -11,9 +11,9 @@ from ._compat.typing import Traversable __all__ = ( - "StringOrIO", "HasOpen", "HasRead", + "StringOrIO", )