From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-il1-x129.google.com (mail-il1-x129.google.com [IPv6:2607:f8b0:4864:20::129]) by sourceware.org (Postfix) with ESMTPS id 8CAC43858CDB for ; Tue, 2 Apr 2024 18:11:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8CAC43858CDB Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 8CAC43858CDB Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::129 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712081495; cv=none; b=GkauugC4BMa2nvkuA5ZbJPJi5FNp8ty3sfIVvCv0aW+OgXC1x0csFCIN28gOO1N4vQnn2MkOkrNTcfwEdagGBaVDMWpec7tWcHWVtKHer7LLMwiCbx5lwnAfEuU/bQo2E3IWCRnkMmLZ5to5CBjRvQ2ovdJ9NruaVeI8UTpOld0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712081495; c=relaxed/simple; bh=NrKKmD2U+u0xqgV9gAcmTjoqtUvOcLa62Jkr7U8mkpM=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=YTMPLcw7nyeSxOaVMEeiZPH7YAymdktQIrDhJTx5lFOhHxk1s72zOfdVbeTeJ5wTfFnI8ZEBQH+6VcKo4nZUvURmLTTaSc3uNKkXfbJAZpC4uxpKWAoeoPQIIn3C8uwhPNNLdqITdxXeOP6Zj3dzbKYM+MgWX/jv/cxAwGCSD/8= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-il1-x129.google.com with SMTP id e9e14a558f8ab-369ec1fbadfso986815ab.2 for ; Tue, 02 Apr 2024 11:11:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1712081493; x=1712686293; darn=sourceware.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=gt6fq6eVGmK2WFJN4t8FD6WBh6yjuFYUnnyiAwRFOeM=; b=XrnMM0To9TKoeScJKAae+3fxJq+zV4iiq32LqaRsJdLo1euyQbxbb21uoUwVClHjS3 fHTw3QjJxJpCULK69LJUSM5ijWVIMymm3LQRYA+GmfsM1KbUJ1cp+XwjukbY9RnV4Aps 2UGK2EgJ4xsMiNVXl+zerNzveVOS+vlcU+ARLGVNNZwU141pDGZGV+AkX2AYE5pFA1U9 CeE5BZuZMzhV3XjwyU1IKbnBJ2FEPfPWprlYjbMUSoCKfUZ87nFUj8tqVRyvBJxGqKZe tn7orvbEzRr7P9zxevj02MIecP+CLm4uHzxXG8oEdzCYPpq4ZfzfzQRBD62ULHFPK2Yr IIdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712081493; x=1712686293; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=gt6fq6eVGmK2WFJN4t8FD6WBh6yjuFYUnnyiAwRFOeM=; b=ilTxlesPAHEejPsvPatPNrO4DVkfG33oVliqMM7JLtWFjX8zqFrJkOJ7zrVsqzpC3L 0KUIzimex+hDi64krE6xnGY+xlB1Y/GKNv1OaWkD0PcOgDc4M55IJ8o1+8S0gRSNhVUo E8uXtyzUwJXDPtfCg0Y3uFN01g+iN+BnqawTxLqo8szH4+gm1gMEMnVb/MfFC1kQw/2t zdWDTBowrTNb9cn3GdEpVtyUguwMxpPASIXKRT2JBcxtH2uRKVpEvkBHZoygMBx4zWq1 7CcS3KCO7EO6Cg86wY5MfejEl3oj5CxxmoCX/0rtL9OE2CxqIOV/tmp2kkeFM2dHaqnK 9rHA== X-Gm-Message-State: AOJu0Yzk7te5+nEFL3FjJGzlSoTnDwp39psnio/FT8Gy3T4gpHFcoyK7 NN2SPeFJaOZddXLUfTNT10w7jYLkfcYSypO7YmxQt161jYtEo8BAsrcYTmyN/TtPBR/9syMcH3A = X-Google-Smtp-Source: AGHT+IHUnbczfXfyR/SmNC1P3YygFWK63kDA7rNIsaB3V9x8lXYWTKUUCtIUgXEE8dJ8YJiw3iO9hQ== X-Received: by 2002:a05:6e02:1c0c:b0:365:def:c5cb with SMTP id l12-20020a056e021c0c00b003650defc5cbmr14626545ilh.30.1712081492731; Tue, 02 Apr 2024 11:11:32 -0700 (PDT) Received: from localhost.localdomain (97-122-82-115.hlrn.qwest.net. [97.122.82.115]) by smtp.gmail.com with ESMTPSA id p17-20020a92d291000000b003684d4f6b44sm3432544ilp.4.2024.04.02.11.11.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Apr 2024 11:11:32 -0700 (PDT) From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH] Add flake8 and isort to .pre-commit-config.yaml Date: Tue, 2 Apr 2024 12:11:21 -0600 Message-ID: <20240402181121.1948535-1-tromey@adacore.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: This adds flake8 and isort to .pre-commit-config.yaml. This way, they will automatically be run on commit. I chose the most recent available versions after verifying that they don't cause any reports or changes in the current tree. Internally at AdaCore, we also use a few flake8 plugins as well, so perhaps that's another avenue for investigation. --- .pre-commit-config.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7afe60c20be..bca8acc5d02 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,3 +6,14 @@ repos: hooks: - id: black files: 'gdb/.*' + - repo: https://github.com/pycqa/flake8 + rev: 7.0.0 + hooks: + - id: flake8 + files: gdb/python/.*\.py$ + args: [--config, gdb/setup.cfg] + - repo: https://github.com/pycqa/isort + rev: 5.13.2 + hooks: + - id: isort + files: gdb/.*\.py$ -- 2.43.0