Skip to content

Conversation

@t-imamichi
Copy link
Collaborator

@t-imamichi t-imamichi commented Aug 17, 2025

Summary

Modernize type hints with support of ruff.
typing module is not necessary in most cases since Python 3.9.
https://typing.python.org/en/latest/guides/modernizing.html

Details and comments

I used the following config of ruff

ruff.toml

line-length = 100
target-version = "py39"

select = [
    "F",
    "UP006",
    "UP007",
    "UP010",
    "UP035",
    "UP036",
    "UP037",
    "UP045",
    "FA100",
]

@coveralls
Copy link

Pull Request Test Coverage Report for Build 17018398040

Details

  • 254 of 255 (99.61%) changed or added relevant lines in 51 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.03%) to 92.07%

Changes Missing Coverage Covered Lines Changed/Added Lines %
qiskit_optimization/minimum_eigensolvers/numpy_eigensolver.py 2 3 66.67%
Totals Coverage Status
Change from base Build 17003369616: 0.03%
Covered Lines: 6037
Relevant Lines: 6557

💛 - Coveralls

Copy link
Member

@woodsp-ibm woodsp-ibm left a comment

Choose a reason for hiding this comment

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

Seems fine to me

@t-imamichi t-imamichi merged commit 2fd64d3 into qiskit-community:main Aug 18, 2025
16 checks passed
@t-imamichi t-imamichi deleted the type-hints branch August 18, 2025 01:59
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.

3 participants