Run pyupgrade on core/utils (#6240)
Run pyupgrade on core/utils (#6240)

* Run pyupgrade on core/utils

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: pre-commit-ci[bot] <3ea08453efb076ca910552532a53973a6527df40@users.noreply.github.com>
pydata/xarray,jhamman/xarray,jhamman/xarray,pydata/xarray,markelg/xray,pydata/xarray,jhamman/xarray,markelg/xray,markelg/xray