Skip to content

Commit 610c1f7

Browse files
chore: relax mypy configuration and exclude tests from CI (#3452)
1 parent ab82da0 commit 610c1f7

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

.github/workflows/type-checker.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,18 +41,18 @@ jobs:
4141
echo "Fetching changed files..."
4242
git diff --name-only --diff-filter=ACMRT origin/${{ github.base_ref }}...HEAD -- '*.py' > changed_files.txt
4343
44-
# Filter for files in src/ and tests/ directories
45-
grep -E "^(src/|tests/)" changed_files.txt > filtered_changed_files.txt || true
44+
# Filter for files in src/ directory only (excluding tests/)
45+
grep -E "^src/" changed_files.txt > filtered_changed_files.txt || true
4646
4747
# Check if there are any changed files
4848
if [ -s filtered_changed_files.txt ]; then
49-
echo "Changed Python files in src/ and tests/:"
49+
echo "Changed Python files in src/:"
5050
cat filtered_changed_files.txt
5151
echo "has_changes=true" >> $GITHUB_OUTPUT
5252
# Convert newlines to spaces for mypy command
5353
echo "files=$(cat filtered_changed_files.txt | tr '\n' ' ')" >> $GITHUB_OUTPUT
5454
else
55-
echo "No Python files changed in src/ or tests/"
55+
echo "No Python files changed in src/"
5656
echo "has_changes=false" >> $GITHUB_OUTPUT
5757
fi
5858
@@ -64,7 +64,7 @@ jobs:
6464
6565
- name: No files to check
6666
if: steps.changed-files.outputs.has_changes == 'false'
67-
run: echo "No Python files in src/ or tests/ were modified - skipping type checks"
67+
run: echo "No Python files in src/ were modified - skipping type checks"
6868

6969
# Summary job to provide single status for branch protection
7070
type-checker:

pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,7 @@ select = [
122122
]
123123

124124
[tool.mypy]
125-
strict = true
126-
exclude = ["src/crewai/cli/templates"]
125+
exclude = ["src/crewai/cli/templates", "tests"]
127126

128127
[tool.bandit]
129128
exclude_dirs = ["src/crewai/cli/templates"]

0 commit comments

Comments
 (0)