Skip to content

Bump Mypy to 1.20#1477

Open
mattwthompson wants to merge 2 commits intomainfrom
bump-mypy
Open

Bump Mypy to 1.20#1477
mattwthompson wants to merge 2 commits intomainfrom
bump-mypy

Conversation

@mattwthompson
Copy link
Copy Markdown
Member

Description

Provide a brief description of the PR's purpose here.

Checklist

  • Add tests
  • Lint
  • Update docstrings

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.97%. Comparing base (239c545) to head (df7e841).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1477   +/-   ##
=======================================
  Coverage   93.97%   93.97%           
=======================================
  Files          73       73           
  Lines        6340     6340           
=======================================
  Hits         5958     5958           
  Misses        382      382           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mattwthompson mattwthompson marked this pull request as ready for review April 6, 2026 23:33
@mattwthompson mattwthompson requested a review from Copilot April 6, 2026 23:33
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Updates the project’s typing toolchain and related dependency constraints, and applies a small refactor to satisfy newer mypy checks.

Changes:

  • Bump mypy dependency to >=1.20 in the typing feature.
  • Tighten/pin related OpenFF dependency constraints in pixi.toml.
  • Refactor _compute_partial_charges to avoid a no-redef ignore by using a new local dict variable.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 3 comments.

File Description
pixi.toml Updates version constraints for mypy and several OpenFF dependencies.
openff/interchange/smirnoff/_nonbonded.py Refactors additional_args handling to satisfy mypy without # type: ignore.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

) -> Quantity:
"""Call out to the toolkit's toolkit wrappers to generate partial charges."""
additional_args: dict[str, str] = {i: j for i, j in additional_args} # type: ignore[no-redef]
additional_args_as_dict: dict[str, str] = {i: j for i, j in additional_args}
Copy link

Copilot AI Apr 6, 2026

Choose a reason for hiding this comment

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

This dict comprehension is equivalent to dict(additional_args) and the latter is simpler/clearer to read. Consider replacing it with dict(additional_args) (keeping the additional_args_as_dict name) to reduce incidental complexity.

Suggested change
additional_args_as_dict: dict[str, str] = {i: j for i, j in additional_args}
additional_args_as_dict: dict[str, str] = dict(additional_args)

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants