Repository: bo4e/BO4E-python (language: python)

Issue:
isort-hook fails with python3.11
Running the current pre-commit config with python 3.11 fails because of an unpinned version of poetry in `isort` see: [issue#2078](https://github.com/PyCQA/isort/pull/2077 ) and [PR ](https://github.com/PyCQA/isort/pull/2078)

## Steps To Reproduce
```
tox -r -e dev -x testenv:dev.basepython=python3.11
source .tox/dev/bin/activate  
pre-commit run
```
## Expected vs. Actual Behavior
### What you expected

Allow development with python >=3.10

### What actually happened
Creating a commit fails with:

```
❯ pre-commit run
[WARNING] Unstaged files detected.
[INFO] Stashing unstaged files to /home/marcel/.cache/pre-commit/patch1695227048-122975.
[INFO] Installing environment for https://github.com/pycqa/isort.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Restored changes from /home/marcel/.cache/pre-commit/patch1695227048-122975.
An unexpected error has occurred: CalledProcessError: command: ('/home/marcel/.cache/pre-commit/repoptdaaa06/py_env-python3/bin/python', '-mpip', 'install', '.')
return code: 1
stdout:
    Processing /home/marcel/.cache/pre-commit/repoptdaaa06
      Installing build dependencies: started
      Installing build dependencies: finished with status 'done'
      Getting requirements to build wheel: started
      Getting requirements to build wheel: finished with status 'done'
      Preparing metadata (pyproject.toml): started
      Preparing metadata (pyproject.toml): finished with status 'error'
stderr:
      error: subprocess-exited-with-error
      
      × Preparing metadata (pyproject.toml) did not run successfully.
      │ exit code: 1
      ╰─> [17 lines of output]
          Traceback (most recent call last):
            File "/home/marcel/.cache/pre-commit/repoptdaaa06/py_env-python3/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
              main()
            File "/home/marcel/.cache/pre-commit/repoptdaaa06/py_env-python3/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
              json_out['return_val'] = hook(**hook_input['kwargs'])
                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            File "/home/marcel/.cache/pre-commit/repoptdaaa06/py_env-python3/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 149, in prepare_metadata_for_build_wheel
              return hook(metadata_directory, config_settings)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            File "/tmp/pip-build-env-2xs_kss9/overlay/lib/python3.11/site-packages/poetry/core/masonry/api.py", line 41, in prepare_metadata_for_build_wheel
              poetry = Factory().create_poetry(Path(".").resolve(), with_groups=False)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            File "/tmp/pip-build-env-2xs_kss9/overlay/lib/python3.11/site-packages/poetry/core/factory.py", line 58, in create_poetry
              raise RuntimeError("The Poetry configuration is invalid:\n" + message)
          RuntimeError: The Poetry configuration is invalid:
            - [extras.pipfile_deprecated_finder.2] 'pip-shims<=0.3.4' does not match '^[a-zA-Z-_.0-9]+$'
          
          [end of output]
      
      note: This error originates from a subprocess, and is likely not a problem with pip.
    error: metadata-generation-failed
    
    × Encountered error while generating package metadata.
    ╰─> See above for output.
    
    note: This is an issue with the package mentioned above, not pip.
    hint: See above for details.
Check the log at /home/marcel/.cache/pre-commit/pre-commit.log
```

## Additional context

Please state your **Python version**: 3.11

A fix was released with https://github.com/PyCQA/isort/tree/5.11.5 - I suggest we update the pre-commit config accordingly.


Discussion / hints:

Fix patch:
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index f4f8d53a8..2e7c1d4a0 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -1,18 +1,18 @@
 exclude: azure-pipelines.yml
 repos:
   - repo: https://github.com/pre-commit/pre-commit-hooks
-    rev: v2.3.0
+    rev: v4.4.0
     hooks:
       - id: check-yaml
       - id: end-of-file-fixer
       - id: trailing-whitespace
   - repo: https://github.com/psf/black
-    rev: 23.1.0 # Replace by any tag/version: https://github.com/psf/black/tags
+    rev: 23.9.1 # Replace by any tag/version: https://github.com/psf/black/tags
     hooks:
       - id: black
         language_version: python3 # Should be a command that runs python3.6+
   - repo: https://github.com/pycqa/isort
-    rev: 5.10.1
+    rev: 5.12.0
     hooks:
       - id: isort
         name: isort (python)
diff --git a/AUTHORS.rst b/AUTHORS.rst
index 21348338f..913d547f3 100644
--- a/AUTHORS.rst
+++ b/AUTHORS.rst
@@ -3,5 +3,5 @@ Contributors
 ============
 
 * Kevin Krechan <kevin.krechan@hochfrequenz.de>
-* Konstantin Klein 
-* Annika Schlögl <annika.schlögl@hochfrequenz.de>
\ No newline at end of file
+* Konstantin Klein
+* Annika Schlögl <annika.schlögl@hochfrequenz.de>
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 7c9924d72..174d1e9a2 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -5,4 +5,4 @@ Changelog
 Version 0.0.1
 =============
 
-- initial release
\ No newline at end of file
+- initial release
diff --git a/MANIFEST.in b/MANIFEST.in
index 8b1378917..e69de29bb 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,1 +0,0 @@
-
diff --git a/docs/requirements.in b/docs/requirements.in
index 43c779a6d..913a5b1e6 100644
--- a/docs/requirements.in
+++ b/docs/requirements.in
@@ -5,4 +5,4 @@ pyhumps
 requests
 typeguard
 # any dependency here should also be a dependency in the docs section of tox.ini
-# see issue https://github.com/bo4e/BO4E-python/issues/474 for a real fix that does not require manual adaptions
\ No newline at end of file
+# see issue https://github.com/bo4e/BO4E-python/issues/474 for a real fix that does not require manual adaptions
diff --git a/tox.ini b/tox.ini
index 09d7d3ce0..eadf305cd 100644
--- a/tox.ini
+++ b/tox.ini
@@ -67,7 +67,7 @@ deps =
     {[testenv:type_check]deps}
     {[testenv:coverage]deps}
     {[testenv:docs]deps}
-    black==23.1.0
+    black==23.9.1
     # Replace by any tag/version: https://github.com/psf/black/tags
     # and change the pre-commit-config.yaml accordingly
     isort


Test patch:
diff --git a/tests/test_data/test_data_adresse/test_data_adresse_missing_plz.json b/tests/test_data/test_data_adresse/test_data_adresse_missing_plz.json
index 00821a137..c89c5022b 100644
--- a/tests/test_data/test_data_adresse/test_data_adresse_missing_plz.json
+++ b/tests/test_data/test_data_adresse/test_data_adresse_missing_plz.json
@@ -2,4 +2,4 @@
   "ort": "Grünwald",
   "strasse": "Nördliche Müncher Straße",
   "hausnummer": "27A"
-}
\ No newline at end of file
+}
diff --git a/tests/test_data/test_data_adresse/test_data_adresse_only_required_fields.json b/tests/test_data/test_data_adresse/test_data_adresse_only_required_fields.json
index d350a5952..0c0edb213 100644
--- a/tests/test_data/test_data_adresse/test_data_adresse_only_required_fields.json
+++ b/tests/test_data/test_data_adresse/test_data_adresse_only_required_fields.json
@@ -3,4 +3,4 @@
   "ort": "Grünwald",
   "strasse": "Nördliche Münchner Straße",
   "hausnummer": "27A"
-}
\ No newline at end of file
+}