Skip to content

Add int typehint to ClickRadius#2943

Merged
j9ac9k merged 1 commit intopyqtgraph:masterfrom
robtau:master
Mar 7, 2024
Merged

Add int typehint to ClickRadius#2943
j9ac9k merged 1 commit intopyqtgraph:masterfrom
robtau:master

Conversation

@robtau
Copy link
Copy Markdown
Contributor

@robtau robtau commented Feb 22, 2024

Added int typehint to ClickRadius because QtCore.QRect constructor only handles int arguments. When provided ClickRadius type is float, it results in QtCore crash. Tested on Python 3.10+
Have a look at:
QRect-1
QRect-2

Other Tasks

Bump Dependency Versions

Files that need updates

Confirm the following files have been either updated or there has been a determination that no update is needed.

  • README.md
  • setup.py
  • tox.ini
  • .github/workflows/main.yml and associated requirements.txt and conda environemt.yml files
  • pyproject.toml
  • binder/requirements.txt
Pre-Release Checklist

Pre Release Checklist

  • Update version info in __init__.py
  • Update CHANGELOG primarily using contents from automated changelog generation in GitHub release page
  • Have git tag in the format of pyqtgraph-
Post-Release Checklist

Steps To Complete

  • Append .dev0 to __version__ in __init__.py
  • Announce on mail list
  • Announce on Twitter

Added int typehint to ClickRadius because QtCore.QRect constructor only handles int input. When provided ClickRadius type is float it results in QtCore crash.
@j9ac9k
Copy link
Copy Markdown
Member

j9ac9k commented Mar 7, 2024

I've been bitten by this very issue, sometimes not knowing if some of these mouth methods would accept ints or floats... This LGTM, thanks @robtau

@j9ac9k j9ac9k merged commit ab66852 into pyqtgraph:master Mar 7, 2024
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