Skip to content

Correct a few places where we are trying to do integer comparisons with None#9794

Merged
michaelDCurran merged 1 commit into
threshold_py3_stagingfrom
py3_someComparisonsWithNone
Jun 24, 2019
Merged

Correct a few places where we are trying to do integer comparisons with None#9794
michaelDCurran merged 1 commit into
threshold_py3_stagingfrom
py3_someComparisonsWithNone

Conversation

@michaelDCurran
Copy link
Copy Markdown
Member

Link to issue number:

Related to #9107

Summary of the issue:

In Python3, it is no longer valid to compair a number with None with operators such as less-than or greater-than.
Our codebase does this in quite a few places.
Most notably at the moment are places that affect:

  • Internet Explorer support
  • table support.

Description of how this pull request fixes the issue:

  • Internet explorer support: ensure that event_objectID is not None before checking if greater than 0.
  • speech: when fetching rowSpan and columnSpan, force these values to 1 if they are 0 or None, as a table cell that has no rowSpan can be assumed to have a rowSpan of 1.

Testing performed:

  • Tables can be spoken and navigated in Firefox in this
    test case
  • Opening and reading any page in Internet Explorer now works again.

Known issues with pull request:

I'm sure there are many more places we need to check, but these will really only be found either through prolonged use, or through static type checking.

Change log entry:

None.

@michaelDCurran michaelDCurran requested a review from josephsl June 23, 2019 23:33
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