Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • S Syntax Highlighting Engine
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 2
    • Issues 2
    • List
    • Boards
    • Service Desk
    • Milestones
  • Bugzilla
    • Bugzilla
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • FrameworksFrameworks
  • Syntax Highlighting Engine
  • Merge requests
  • !230

Python: Make unescaped single quote (' or ") strings non-multiline

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Jan Paul Batrina requested to merge work/python-singleline-strings into master Jul 25, 2021
  • Overview 2
  • Commits 1
  • Pipelines 0
  • Changes 6

In Python, the following lines are invalid:

a = "this is a
multiline string"

since the string should be ended on the same line, or continued with a \ escape at the end.

When such invalid strings are found, all succeeding lines will be marked as an error so that the unfinished/unescaped string is easier to spot.

The behavior of strings and the \ escape will now be mostly the same except for the error case

kate-python-unescaped-singlestring

Edited Jul 26, 2021 by Jan Paul Batrina
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: work/python-singleline-strings