-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add mypy #51
Add mypy #51
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,22 @@ | ||||||||||||||
name: MyPy | ||||||||||||||
|
||||||||||||||
on: | ||||||||||||||
push: | ||||||||||||||
branches: [ main ] | ||||||||||||||
pull_request: | ||||||||||||||
|
||||||||||||||
jobs: | ||||||||||||||
mypy: | ||||||||||||||
runs-on: ubuntu-latest | ||||||||||||||
steps: | ||||||||||||||
- name: Setup Python | ||||||||||||||
uses: actions/setup-python@v5 | ||||||||||||||
with: | ||||||||||||||
python-version: "3.13" | ||||||||||||||
architecture: x64 | ||||||||||||||
- name: Checkout | ||||||||||||||
uses: actions/checkout@v4 | ||||||||||||||
- name: Install mypy | ||||||||||||||
run: pip install mypy | ||||||||||||||
Comment on lines
+19
to
+20
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add package installation step MyPy needs to analyze the installed package. The current workflow only installs mypy but not the package itself. - name: Install mypy
- run: pip install mypy
+ run: |
+ pip install mypy
+ pip install -e . 📝 Committable suggestion
Suggested change
|
||||||||||||||
- name: Test | ||||||||||||||
run: mypy --ignore-missing-imports ${{ github.event.repository.name }} | ||||||||||||||
Comment on lines
+1
to
+22
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification Add mypy configuration for consistent type checking The repository lacks mypy configuration settings. Since the project uses pyproject.toml for other configurations, I recommend adding a Key points to consider:
🔗 Analysis chainVerify mypy configuration file existence It would be beneficial to check if a mypy configuration file exists in the repository to ensure consistent type checking settings. Let me check the content of pyproject.toml to see if it has any mypy configuration, even if not under the [tool.mypy] section. 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Check for mypy config files
echo "Checking for mypy configuration files..."
fd -t f "mypy.ini|setup.cfg|pyproject.toml"
# If pyproject.toml exists, check for mypy section
if [ -f "pyproject.toml" ]; then
echo "Checking pyproject.toml for mypy configuration..."
cat pyproject.toml | grep -A 10 "\[tool.mypy\]"
fi
Length of output: 338 Script: #!/bin/bash
# Display the full content of pyproject.toml
echo "Content of pyproject.toml:"
cat pyproject.toml
Length of output: 1414 🧰 Tools🪛 yamllint (1.35.1)[error] 22-22: no new line character at the end of file (new-line-at-end-of-file) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider using a stable Python version
Python 3.13 is currently in alpha and might lead to unstable CI results. Consider using Python 3.11 or 3.12 instead.
📝 Committable suggestion