Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewAI empowers agents to work together seamlessly, tackling complex tasks.
chore: run ruff check and format on all files in CI
Greyson LaLonde90caa621580c
diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.ymlindex ae26c4209..ecef1d1f6 100644--- a/.github/workflows/linter.yml+++ b/.github/workflows/linter.yml@@ -8,15 +8,8 @@ permissions:jobs:lint:runs-on: ubuntu-latest- env:- TARGET_BRANCH: ${{ github.event.pull_request.base.ref }}steps:- uses: actions/checkout@v4- with:- fetch-depth: 0-- - name: Fetch Target Branch- run: git fetch origin $TARGET_BRANCH --depth=1- name: Restore global uv cacheid: cache-restore@@ -40,23 +33,11 @@ jobs:- name: Install dependenciesrun: uv sync --all-groups --all-extras --no-install-project- - name: Get Changed Python Files- id: changed-files- run: |- merge_base=$(git merge-base origin/"$TARGET_BRANCH" HEAD)- changed_files=$(git diff --name-only --diff-filter=ACMRTUB "$merge_base" | grep '\.py$' || true)- echo "files<<EOF" >> $GITHUB_OUTPUT- echo "$changed_files" >> $GITHUB_OUTPUT- echo "EOF" >> $GITHUB_OUTPUT+ - name: Ruff check+ run: uv run ruff check lib/- - name: Run Ruff on Changed Files- if: ${{ steps.changed-files.outputs.files != '' }}- run: |- echo "${{ steps.changed-files.outputs.files }}" \- | tr ' ' '\n' \- | grep -v 'src/crewai/cli/templates/' \- | grep -v '/tests/' \- | xargs -I{} uv run ruff check "{}"+ - name: Ruff format+ run: uv run ruff format --check lib/- name: Save uv cachesif: steps.cache-restore.outputs.cache-hit != 'true'diff --git a/lib/crewai/src/crewai/memory/memory_scope.py b/lib/crewai/src/crewai/memory/memory_scope.pyindex 2384600f4..de074ce25 100644--- a/lib/crewai/src/crewai/memory/memory_scope.py+++ b/lib/crewai/src/crewai/memory/memory_scope.py@@ -80,28 +80,28 @@ class MemoryScope(BaseModel):)def remember_many(- self,- contents: list[str],- scope: str | None = "/",- categories: list[str] | None = None,- metadata: dict[str, Any] | None = None,- importance: float | None = None,- source: str | None = None,- private: bool = False,- agent_role: str | None = None,+ self,+ contents: list[str],+ scope: str | None = "/",+ categories: list[str] | None = None,+ metadata: dict[str, Any] | None = None,+ importance: float | None = None,+ source: str | None = None,+ private: bool = False,+ agent_role: str | None = None,) -> list[MemoryRecord]:- """Remember multiple items; scope is relative to this scope's root."""- path = self._scope_path(scope)- return self._memory.remember_many(- contents,- scope=path,- categories=categories,- metadata=metadata,- importance=importance,- source=source,- private=private,- agent_role=agent_role,- )+ """Remember multiple items; scope is relative to this scope's root."""+ path = self._scope_path(scope)+ return self._memory.remember_many(+ contents,+ scope=path,+ categories=categories,+ metadata=metadata,+ importance=importance,+ source=source,+ private=private,+ agent_role=agent_role,+ )def recall(self,