From b908c1027b85fe45a514bd67ed3801001987c69d Mon Sep 17 00:00:00 2001 From: SwiftyOS Date: Wed, 30 Oct 2024 21:56:44 +0000 Subject: [PATCH] Add detect secrets pre commit --- .pre-commit-config.yaml | 11 ++++++++++- .../backend/backend/usecases/block_autogen.py | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7bf2e6771a2d..d67aba9edc93 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,6 +9,15 @@ repos: - id: check-merge-conflict - id: check-symlinks - id: debug-statements + + - repo: https://github.com/Yelp/detect-secrets + rev: v1.5.0 + hooks: + - id: detect-secrets + name: Detect secrets + description: Detects high entropy strings that are likely to be passwords. + files: ^autogpt_platform/ + stages: [push] - repo: local # isort needs the context of which packages are installed to function, so we @@ -42,7 +51,7 @@ repos: hooks: - id: black name: Lint (Black) - language_version: python3.10 + language_version: python3.12 - repo: https://github.com/PyCQA/flake8 rev: 7.0.0 diff --git a/autogpt_platform/backend/backend/usecases/block_autogen.py b/autogpt_platform/backend/backend/usecases/block_autogen.py index 9f5ae435286d..90977f3c2b39 100644 --- a/autogpt_platform/backend/backend/usecases/block_autogen.py +++ b/autogpt_platform/backend/backend/usecases/block_autogen.py @@ -124,7 +124,7 @@ def create_test_graph() -> Graph: Here are a couple of sample of the Block class implementation: -{"--------------\n".join([sample_block_codes[v] for v in sample_block_modules])} +{"--------------".join([sample_block_codes[v] for v in sample_block_modules])} """, }, )