Skip to content

Python 3: fix several remaining division errors - #9774

Merged
michaelDCurran merged 9 commits into
nvaccess:threshold_py3_stagingfrom
BabbageCom:py3_moreDivision
Jun 21, 2019
Merged

Python 3: fix several remaining division errors#9774
michaelDCurran merged 9 commits into
nvaccess:threshold_py3_stagingfrom
BabbageCom:py3_moreDivision

Conversation

@LeonarddeR

Copy link
Copy Markdown
Collaborator

Link to issue number:

Hopefully fixes #9641
Follow up to #9692, #9737 and #9748

Summary of the issue:

After the pull requests mentioned above, there were still some major issues with the behavioural changes to the Python 3 default division operator.

Description of how this pull request fixes the issue:

On the source code, executed python modernize with the libmodernize.fixes.fix_classic_division operator. Recorded the diff and changed only the division operators for necessary cases. In the case where the mouse was positioned at the center of an object, switched to using locationHelper instead in order to be less error prone in the future.

Testing performed:

t.b.d.

Known issues with pull request:

I'm a human being. Therefore, I could have discarded some changes by modernize of which I thought they weren't necessary. Note that modernize is way too aggressive, though (i.e. it does not explore the context of division operators).

Change log entry:

None

@josephsl josephsl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hi,

Got it, thanks for catching them.

Type hints: yes, it will work with Python 3. I think we should create an issue about use of type hints throughout NVDA after Python 3 transition is done.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants