Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
gst-devtools
gst-devtools
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 34
    • Issues 34
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 10
    • Merge Requests 10
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • GStreamer
  • gst-devtoolsgst-devtools
  • Merge Requests
  • !24

Merged
Opened Jan 15, 2019 by Alicia Boya García@ntrrgcContributor

pre-commit-python: Allow line breaks between binary operators

  • Overview 0
  • Commits 1
  • Pipelines 1
  • Changes 1

pre-commit-python overrides the list of ignored Python style errors. Unfortunately, before this patch the list did not exclude W503 and W504 (which are otherwise ignored by default).

The consequence of having those two warnings enabled at the same time is that it's not possible to break lines on binary operators, which is an unreasonable unintentional restriction:

  'validateflow': "validateflow, expectations-dir=\"" +
                  expectations_dir + "\", actual-results-dir=\"" +
                  actual_results_dir + "\"",

W504 line break after binary operator

  'validateflow': "validateflow, expectations-dir=\""
                  + expectations_dir + "\", actual-results-dir=\""
                  + actual_results_dir + "\"",

W503 line break before binary operator

This patch excludes W503 so that there is a valid style for breaking lines on binary operators.

Edited Jan 15, 2019 by Alicia Boya García
Assignee
Assign to
Reviewer
Request review from
1.15.1
Milestone
1.15.1
Assign milestone
Time tracking
Reference: gstreamer/gst-devtools!24
Source branch: python-style-warnings