Updated pre-commit modules and adapted to the new Ruff default ruleset (#1252)