diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b1a99e0b..b5051e13 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -15,7 +15,7 @@ repos: - id: flake8 args: [ "--select=E9,F63,F7,F82"] - repo: https://github.com/asottile/pyupgrade - rev: v2.11.0 + rev: v2.12.0 hooks: - id: pyupgrade args: ['--py36-plus','--exit-zero-even-if-changed'] \ No newline at end of file diff --git a/popmon/hist/hist_utils.py b/popmon/hist/hist_utils.py index 238dc361..1c70a192 100644 --- a/popmon/hist/hist_utils.py +++ b/popmon/hist/hist_utils.py @@ -170,9 +170,7 @@ def project_split2dhist_on_axis(splitdict, axis="x"): :rtype: SortedDict """ if not isinstance(splitdict, dict): - raise TypeError( - "splitdict: {wt}, type should be a dictionary.".format(wt=type(splitdict)) - ) + raise TypeError(f"splitdict: {type(splitdict)}, type should be a dictionary.") if axis not in ["x", "y"]: raise ValueError(f"axis: {axis}, can only be x or y.")