Visitar URL original
Auto deindentation if whole code block pasted are indented · Issue #771 · bpython/bpython · GitHub
Skip to content

Auto deindentation if whole code block pasted are indented #771

Description

@shelper

i use bpython in vscode and if i send a block of lines that are indented to bpython, it will raise indentation error.

I wonder if it is possible to deindent the code if the whole block is indented. that makes sense if you want to test run lines within a loop , for instance.

Activity

  1. ikanobori commented on Jan 5, 2020

    @ikanobori
    Contributor

    It does make sense, is this like a copy/paste into the terminal or does "sending a block of lines" do something different?

  2. shelper commented on Jan 5, 2020

    @shelper
    Author

    sending a blocking of lines

  3. nraw commented on Feb 2, 2020

    @nraw

    I think this is a critical deterrent for me.

    When it comes to sending some lines from the code to bpython, for me they would rarely start without some indentation before it, so already something along the line of:

        a = 3
    

    will break. This will also break in vanilla python, but wouldn't break in ipython for example.

  4. nraw commented on Feb 2, 2020

    @nraw
  5. added this to the release-0.20 milestone on Apr 11, 2020
  6. self-assigned this
    on Apr 11, 2020
  7. supakeen commented on Apr 11, 2020

    @supakeen
    Member

    This will have to be gated between likely both paste detection and/or a feature flag that might default to on.

  8. removed their assignment
    on Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions