From e02adf1dab9e30815fec4150eedbb01e15a81509 Mon Sep 17 00:00:00 2001 From: sbrugman Date: Wed, 14 Apr 2021 21:03:47 +0200 Subject: [PATCH] build: update pyupgrade to v2.12.0 --- .pre-commit-config.yaml | 2 +- popmon/hist/hist_utils.py | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) 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.")