Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/requirements_dev.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
pytest
mypy==0.670
mypy==2.0.0

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | 🏗️ Heavy lift

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Find Python version constraints in the project

echo "=== Checking Python version in setup files ==="
fd -e py -e cfg -e toml -e txt setup pyproject requirements | xargs rg -n "python_requires|Programming Language :: Python :: 3\." 2>/dev/null || echo "No explicit Python version found"

echo -e "\n=== Checking .python-version or runtime configs ==="
fd -H "^\.python-version$|^runtime\.txt$|^\.tool-versions$" -x cat {} \;

echo -e "\n=== Checking for Python version in CI configs ==="
fd -e yml -e yaml -g "*ci*" -g "*workflow*" -x rg -n "python-version|python_version" {} \;

Repository: salimfadhley/dockerized_python_playground

Length of output: 541


🏁 Script executed:

#!/bin/bash
# Description: Find mypy configuration files and settings

echo "=== Checking for mypy config files ==="
fd -H "^mypy\.ini$|^\.mypy\.ini$|^setup\.cfg$|^pyproject\.toml$" -x echo "Found: {}" \;

echo -e "\n=== Checking mypy settings in config files ==="
fd -H "^mypy\.ini$|^\.mypy\.ini$" -x cat {} \;
rg -n "^\[mypy" setup.cfg pyproject.toml 2>/dev/null || echo "No mypy config found in setup.cfg or pyproject.toml"

echo -e "\n=== Checking for strict_bytes, local_partial_types, allow_redefinition usage ==="
rg -n "strict_bytes|local_partial_types|allow_redefinition" 2>/dev/null || echo "No existing config for new defaults found"

Repository: salimfadhley/dockerized_python_playground

Length of output: 348


🏁 Script executed:

#!/bin/bash
# Description: Check if mypy is run in CI and recent pipeline status

echo "=== Checking for mypy in CI configs ==="
fd -e yml -e yaml -g "*ci*" -g "*workflow*" -g "*travis*" -g "*circle*" | xargs rg -n "mypy" 2>/dev/null || echo "No mypy found in CI configs"

echo -e "\n=== Checking recent CI status for this PR ==="
gh pr view 574 --json statusCheckRollup --jq '.statusCheckRollup[] | select(.context | test("mypy|type|lint|test"; "i")) | {context: .context, state: .state, conclusion: .conclusion}'

Repository: salimfadhley/dockerized_python_playground

Length of output: 437


🏁 Script executed:

# Find and examine Python project configuration files
cd /tmp && git -C /tmp 2>/dev/null || true
find . -maxdepth 2 -type f \( -name "setup.py" -o -name "pyproject.toml" -o -name "setup.cfg" -o -name "tox.ini" \) 2>/dev/null | head -10

Repository: salimfadhley/dockerized_python_playground

Length of output: 2246


🏁 Script executed:

# Get file listings to understand structure better
ls -la | head -20
find . -maxdepth 2 -type d | head -20

Repository: salimfadhley/dockerized_python_playground

Length of output: 1001


🏁 Script executed:

# Search for CI/CD configuration files properly
find . -type f \( -name "*.yml" -o -name "*.yaml" \) 2>/dev/null | grep -E "(github|gitlab|travis|circle|jenkins)" | head -10
ls -la .github/workflows/ 2>/dev/null || echo "No .github/workflows directory"

Repository: salimfadhley/dockerized_python_playground

Length of output: 130


🏁 Script executed:

# Check if mypy is imported or used anywhere in the codebase
rg "mypy|type.*check" --type py | head -20

Repository: salimfadhley/dockerized_python_playground

Length of output: 67


🏁 Script executed:

# Read .travis.yml to see Python version and mypy setup
cat .travis.yml

Repository: salimfadhley/dockerized_python_playground

Length of output: 218


🏁 Script executed:

# Read Dockerfile to see Python version
cat Dockerfile

Repository: salimfadhley/dockerized_python_playground

Length of output: 266


🏁 Script executed:

# Read requirements_dev.txt to see full context
cat src/requirements_dev.txt

Repository: salimfadhley/dockerized_python_playground

Length of output: 117


🏁 Script executed:

# Search for setup.py anywhere
find . -name "setup.py" -o -name "setup.cfg" -o -name "pyproject.toml"

Repository: salimfadhley/dockerized_python_playground

Length of output: 100


🏁 Script executed:

# Check docker-compose for Python version hint
cat docker-compose.yaml

Repository: salimfadhley/dockerized_python_playground

Length of output: 420


🏁 Script executed:

# Read setup.py to see Python version constraints
cat src/setup.py

Repository: salimfadhley/dockerized_python_playground

Length of output: 1166


🏁 Script executed:

# Verify if requirements_dev.txt is actually used in CI/Dockerfile
grep -r "requirements_dev" . --include="*.py" --include="*.yml" --include="*.yaml" --include="Dockerfile*"

Repository: salimfadhley/dockerized_python_playground

Length of output: 162


mypy 2.0.0 is incompatible with project's Python 3.6 CI environment.

The upgrade to mypy 2.0.0 introduces a critical version mismatch: mypy 2.0 requires Python 3.10+, but .travis.yml configures the CI environment to use Python 3.6. Additionally, the requirements_dev.txt installation is currently commented out in the Dockerfile, masking this incompatibility.

Before merging, decide on one of the following:

  • Update Python: Upgrade CI to Python 3.10+ and uncomment the requirements_dev.txt installation in the Dockerfile
  • Downgrade mypy: Use a version compatible with Python 3.6 (e.g., mypy 0.x)
  • Keep disabled: If mypy is intentionally not being used, remove it from requirements_dev.txt to avoid confusion

Note: mypy 2.0 also enables stricter defaults (--strict-bytes, --local-partial-types) that may surface new type errors once enabled.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/requirements_dev.txt` at line 2, requirements_dev.txt pins mypy==2.0.0
which is incompatible with the CI Python 3.6 environment; either upgrade CI to
Python 3.10+ and enable installing requirements_dev.txt in the Dockerfile, or
change requirements_dev.txt to a mypy release that supports Python 3.6 (e.g.,
mypy 0.x), or remove mypy from requirements_dev.txt if it is not used. Locate
the mypy entry in requirements_dev.txt and update the version or remove it, and
then update .travis.yml to use Python 3.10+ and uncomment the
requirements_dev.txt installation in the Dockerfile if you choose to upgrade the
CI; ensure any chosen option is documented in the PR description.

pylint2junit