From fa1af925376b12a11f8c5e585bdb0a101f027792 Mon Sep 17 00:00:00 2001 From: voidking Date: Tue, 19 Dec 2023 20:34:53 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feature:=20=E6=94=AF=E6=8C=81pre-commit?= =?UTF-8?q?=E6=A3=80=E6=9F=A5=E4=BB=A3=E7=A0=81=E8=A7=84=E8=8C=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pre-commit.yaml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/pre-commit.yaml diff --git a/.github/workflows/pre-commit.yaml b/.github/workflows/pre-commit.yaml new file mode 100644 index 0000000000..ed4bbb1447 --- /dev/null +++ b/.github/workflows/pre-commit.yaml @@ -0,0 +1,30 @@ +name: Pre-commit checks + +on: + pull_request: + branches: + - '**' + push: + branches: + - '**' + +jobs: + pre-commit-check: + runs-on: ubuntu-latest + steps: + - name: Checkout Source Code + uses: actions/checkout@v2 + + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: '3.9.17' + + - name: Install pre-commit + run: pip install pre-commit + + - name: Initialize pre-commit + run: pre-commit install + + - name: Run pre-commit hooks + run: pre-commit run --all-files \ No newline at end of file From bf9fa4476549d2b57fbe62f5a6df9d2825d46a21 Mon Sep 17 00:00:00 2001 From: voidking Date: Wed, 20 Dec 2023 14:07:52 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20metagpt/team.py=20?= =?UTF-8?q?=E7=AC=A6=E5=90=88=E4=BB=A3=E7=A0=81=E8=A7=84=E8=8C=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- metagpt/team.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/metagpt/team.py b/metagpt/team.py index 1df3c4052c..0c1efb8121 100644 --- a/metagpt/team.py +++ b/metagpt/team.py @@ -10,6 +10,7 @@ from pathlib import Path import warnings + from pydantic import BaseModel, Field from metagpt.actions import UserRequirement @@ -94,9 +95,12 @@ def start_project(self, idea, send_to: str = ""): Deprecated: This method will be removed in the future. Please use the `run_project` method instead. """ - warnings.warn("The 'start_project' method is deprecated and will be removed in the future. " - "Please use the 'run_project' method instead.", - DeprecationWarning, stacklevel=2) + warnings.warn( + "The 'start_project' method is deprecated and will be removed in the future. " + "Please use the 'run_project' method instead.", + DeprecationWarning, + stacklevel=2, + ) return self.run_project(idea=idea, send_to=send_to) def _save(self):