diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d3ab87f7..cc3f9b46 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,7 +4,7 @@ ci: repos: - repo: https://github.com/psf/black-pre-commit-mirror - rev: 23.9.1 + rev: 23.10.0 hooks: - id: black-jupyter @@ -24,13 +24,13 @@ repos: - id: end-of-file-fixer - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.0.292" + rev: "v0.1.1" hooks: - id: ruff args: ["--fix", "--show-fixes"] - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.6.0 + rev: v1.6.1 hooks: - id: mypy files: '^src/decaylanguage/(decay|dec|utils)/' diff --git a/src/decaylanguage/decay/viewer.py b/src/decaylanguage/decay/viewer.py index 9a9fef6c..305d56fa 100644 --- a/src/decaylanguage/decay/viewer.py +++ b/src/decaylanguage/decay/viewer.py @@ -110,9 +110,7 @@ def html_table_label( if add_tags: label = f'<' else: - label = '<
'.format( - bgcolor=bgcolor - ) + label = f'<
' for i, n in enumerate(names): if add_tags: label += ''.format( diff --git a/src/decaylanguage/modeling/goofit.py b/src/decaylanguage/modeling/goofit.py index c0ab6c41..2359faeb 100644 --- a/src/decaylanguage/modeling/goofit.py +++ b/src/decaylanguage/modeling/goofit.py @@ -279,9 +279,7 @@ def make_lineshape(self, structure, masses): radius = 5.0 if "c" in self.particle.quarks.lower() else 1.5 if self.ls_enum == LS.RBW: - return 'new Lineshapes::RBW("{name}", {par}_M, {par}_W, {L}, {masses}, FF::BL2)'.format( - name=name, par=par, L=L, masses=masses - ) + return f'new Lineshapes::RBW("{name}", {par}_M, {par}_W, {L}, {masses}, FF::BL2)' if self.ls_enum == LS.GSpline: min_ = self.__class__.consts.loc[f"{self.name}::Spline::Min", "value"] max_ = self.__class__.consts.loc[f"{self.name}::Spline::Max", "value"] @@ -336,9 +334,7 @@ def make_spinfactor(self, final_states): for spin_factor in spin_factors: structure_list = ", ".join(map(str, structure)) factor.append( - ' new SpinFactor("SF", SF_4Body::{spin_factor.name:37}, {structure_list})'.format( - spin_factor=spin_factor, structure_list=structure_list - ) + f' new SpinFactor("SF", SF_4Body::{spin_factor.name:37}, {structure_list})' ) exit_ = "\n }));\n" return intro + ",\n".join(factor) + exit_ @@ -691,9 +687,7 @@ def make_spinfactor(self, final_states): for spin_factor in spin_factors: structure_list = ", ".join(map(str, structure)) factor.append( - ' SpinFactor("SF", SF_4Body.{spin_factor.name:37}, {structure_list})'.format( - spin_factor=spin_factor, structure_list=structure_list - ) + f' SpinFactor("SF", SF_4Body.{spin_factor.name:37}, {structure_list})' ) exit_ = "))\n" return intro + ",\n".join(factor) + exit_
{name}