question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Auto-suggestion (matching brackets code maybe ?) creates broken code even on trival statements

See original GitHub issue

This is in a fresh python:latest docker container where I installed the latest ipython version with pip.

Python 3.10.1 (main, Dec 21 2021, 09:01:08) [GCC 10.2.1 20210110]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.0.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: foo = 'bar''

I typed foo = 'bar' and it added a second single quote at the end, which is obviously invalid. The same happens with double quotes, so as much as I dislike this black integration, it seems unrelated since it happens at input time and not only when I run the code.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:1
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
Carreaucommented, Jan 15, 2022

That’s why I used a fresh docker container with no history etc whatsoever 😉

Haha.

I just avoid writing code, it’s easier.

0reactions
Carreaucommented, Feb 25, 2022

#13487 and @lucymcphail’s #13540 should fix most use case. There might be case where if you have escaped quotes or quotes within strings it may still misbehave, but that will be less of a problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Check for Balanced Brackets in an expression (well ...
Given an expression string, write a program to examine whether the pairs and the orders of parentheses are balanced in expression or not....
Read more >
Automatically insert a matching brace in Vim - Stack Overflow
A solution for braces, brackets and parenthesis with tab in between. " Automatically closing braces inoremap {< ...
Read more >
Changelog — Python 3.11.1 documentation
Python next: Release date: XXXX-XX-XX Core and Builtins: gh-100050: Honor existing errors obtained when searching for mismatching parentheses in the ...
Read more >
Apex Developer Guide - Salesforce Implementation guides
Therefore, Apex produces code that is both succinct and easy to write. ... braces and can be used in any place where a...
Read more >
A case against syntax highlighting - Linus Åkesson
Did the programmers get the syntax all mixed up when reading code, thinking that ")" was perhaps a variable name or even a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found