Repository: scikit-hep/cabinetry (language: python)

Issue:
style: apply Black's 2024 style
Applying latest `black` formatting corresponding to the stable 2024 style with tag [24.1.0](https://github.com/psf/black/releases/tag/24.1.0). Running also once with `--skip-magic-trailing-comma` to adjust leftover commas. See also #383 for the previous version of this PR. Also adding `black` back to CI following the temporary removal in #459.

```
* apply Black's 2024 style
* updated pre-commit
* add back black to CI
```


Discussion / hints:

Fix patch:
diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml
index fe01ee60..dc5ee9bb 100644
--- a/.github/workflows/CI.yml
+++ b/.github/workflows/CI.yml
@@ -13,8 +13,8 @@ jobs:
   pre-commit:
     runs-on: ubuntu-latest
     steps:
-    - uses: actions/checkout@v3
-    - uses: actions/setup-python@v4
+    - uses: actions/checkout@v4
+    - uses: actions/setup-python@v5
       with:
         python-version: '3.11'
     - uses: pre-commit/action@v3.0.0
@@ -27,9 +27,9 @@ jobs:
         python-version: ['3.8', '3.9', '3.10', '3.11']
 
     steps:
-    - uses: actions/checkout@v3
+    - uses: actions/checkout@v4
     - name: Set up Python ${{ matrix.python-version }}
-      uses: actions/setup-python@v4
+      uses: actions/setup-python@v5
       with:
         python-version: ${{ matrix.python-version }}
     - name: Install cabinetry and dependencies
@@ -42,9 +42,9 @@ jobs:
         flake8 src/cabinetry --select=E9,F63,F7,F82 --show-source
         # check for additional issues flagged by flake8
         flake8
-    - name: Format with Black
-      run: |
-        black --check --diff --verbose .
+    # - name: Format with Black
+    #   run: |
+    #     black --check --diff --verbose .
     - name: Run example
       run: |
         python utils/create_ntuples.py
@@ -65,12 +65,13 @@ jobs:
         pytest --runslow
     - name: Upload coverage to codecov
       if: matrix.python-version == '3.8'
-      uses: codecov/codecov-action@v3
+      uses: codecov/codecov-action@v4
       with:
         token: ${{ secrets.CODECOV_TOKEN }}
         file: ./coverage.xml
         name: codecov-umbrella
         fail_ci_if_error: true
+        verbose: true
     - name: Build docs with sphinx
       run: |
         python -m pip install .[docs]
diff --git a/.github/workflows/dependencies-head.yml b/.github/workflows/dependencies-head.yml
index 8dd5a8c0..526d5813 100644
--- a/.github/workflows/dependencies-head.yml
+++ b/.github/workflows/dependencies-head.yml
@@ -16,9 +16,9 @@ jobs:
         python-version: ['3.11']
 
     steps:
-    - uses: actions/checkout@v3
+    - uses: actions/checkout@v4
     - name: Set up Python ${{ matrix.python-version }}
-      uses: actions/setup-python@v4
+      uses: actions/setup-python@v5
       with:
         python-version: ${{ matrix.python-version }}
     - name: Install dependencies
@@ -41,9 +41,9 @@ jobs:
         python-version: ['3.11']
 
     steps:
-    - uses: actions/checkout@v3
+    - uses: actions/checkout@v4
     - name: Set up Python ${{ matrix.python-version }}
-      uses: actions/setup-python@v4
+      uses: actions/setup-python@v5
       with:
         python-version: ${{ matrix.python-version }}
     - name: Install dependencies
@@ -66,9 +66,9 @@ jobs:
         python-version: ['3.11']
 
     steps:
-    - uses: actions/checkout@v3
+    - uses: actions/checkout@v4
     - name: Set up Python ${{ matrix.python-version }}
-      uses: actions/setup-python@v4
+      uses: actions/setup-python@v5
       with:
         python-version: ${{ matrix.python-version }}
     - name: Install dependencies
@@ -92,9 +92,9 @@ jobs:
         python-version: ['3.11']
 
     steps:
-    - uses: actions/checkout@v3
+    - uses: actions/checkout@v4
     - name: Set up Python ${{ matrix.python-version }}
-      uses: actions/setup-python@v4
+      uses: actions/setup-python@v5
       with:
         python-version: ${{ matrix.python-version }}
     - name: Install dependencies


Test patch:
diff --git a/.github/workflows/test-package.yml b/.github/workflows/test-package.yml
index df0a5641..809a21e5 100644
--- a/.github/workflows/test-package.yml
+++ b/.github/workflows/test-package.yml
@@ -15,12 +15,12 @@ jobs:
     name: Build and test Python distro
     runs-on: ubuntu-latest
     steps:
-    - uses: actions/checkout@v3
+    - uses: actions/checkout@v4
       with:
         fetch-depth: 0
 
     - name: Set up Python 3.11
-      uses: actions/setup-python@v4
+      uses: actions/setup-python@v5
       with:
         python-version: '3.11'