Replace flake8 with ruff and apply consistent linting rules across the entire codebase. Update type annotations, quotation marks, and other style-related changes to comply with the new standards.
* Fix value error
* test: add test for models with empty local_managers
* fix: check for local_managers being empty
Co-authored-by: Mike <22396211+Dresdn@users.noreply.github.com>