Skip to content

Conversation

@lukaszgo1
Copy link
Contributor

Link to issue number:

Discussion in #15299
Unblocks PR #15546

Summary of the issue:

The version of Flake8 we're using is extremely old. While it worked well up to now, it does not support some newer syntactic construct in recent versions of Python (in particular walrus operator). Unfortunately we cannot update to the latest release, since it does not support flake8-tabs, nor linting a diff (the latter can be achieved using external tools).

Description of user facing changes

None

Description of development approach

Flake8 is updated to the version 4.0.1. This is the last version which supports flake8-tabs, and it also recognizes various newer language constructs in Python, by the simple fact that it was released almost 2.5 years after the version we're using currently.

Testing strategy:

Ensured that code from PR #15546 can be linted correctly.

Known issues with pull request:

While this version of Flake8 is way more recent than what we we're using up to now, it predates Python 3.11. It means that some constructs (case statements) would not be recognized. Possible solutions are discussed in #15299.

Code Review Checklist:

  • Documentation:
    • Change log entry
    • User Documentation
    • Developer / Technical Documentation
    • Context sensitive help for GUI changes
  • Testing:
    • Unit tests
    • System (end to end) tests
    • Manual testing
  • UX of all users considered:
    • Speech
    • Braille
    • Low Vision
    • Different web browsers
    • Localization in other languages / culture than English
  • API is compatible with existing add-ons.
  • Security precautions taken.

@lukaszgo1 lukaszgo1 requested a review from a team as a code owner October 16, 2023 20:05
@lukaszgo1 lukaszgo1 requested a review from seanbudd October 16, 2023 20:05
@seanbudd seanbudd added the conceptApproved Similar 'triaged' for issues, PR accepted in theory, implementation needs review. label Oct 16, 2023
Copy link
Member

@seanbudd seanbudd left a comment

Choose a reason for hiding this comment

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

Thanks @lukaszgo1

@seanbudd seanbudd merged commit 2f251c1 into nvaccess:master Oct 18, 2023
@nvaccessAuto nvaccessAuto added this to the 2024.1 milestone Oct 18, 2023
@lukaszgo1 lukaszgo1 deleted the flake8_4 branch October 18, 2023 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

conceptApproved Similar 'triaged' for issues, PR accepted in theory, implementation needs review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants