Python Forum
Sublime Text + Anaconda not indenting Python code correctly
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sublime Text + Anaconda not indenting Python code correctly
#1
Running:

Sublime Text 3.2.2
Python 3.8.2

Anaconda's autoformat feature reindents the code below as follows:


    counter = 0

    def print_this():

      print("Hello World.")
      return

      def main(counter):

        if counter < 10:
          print_this()
          counter += 1
          main(counter)
        else:
          print("All done.")
          return


          main(counter)
What adjustments do the Anaconda linting settings need to get the reindentation to format code properly?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Why can I not see the code correctly in Python IDLE.? Trump 8 695 Apr-04-2024, 07:47 AM
Last Post: jonesphedra
  hi need help to make this code work correctly atulkul1985 5 783 Nov-20-2023, 04:38 PM
Last Post: deanhystad
  Anaconda 2.4.2: The JupyterLab 3.5.3 fails to run the python code of the Geographical jamalnuman 0 334 Aug-23-2023, 07:48 AM
Last Post: jamalnuman
  while loop not working-I am using sublime text editor mma_python 4 1,127 Feb-05-2023, 06:26 PM
Last Post: deanhystad
  Sublime Text Editor not recognizing Python elroberto 5 2,873 Jun-13-2022, 04:00 PM
Last Post: rob101
  Serializing Python data Correctly (JSON) JgKSuperstar 4 2,104 Nov-04-2021, 07:31 PM
Last Post: JgKSuperstar
  Code folding in Sublime Text Mondata 2 2,805 Mar-12-2021, 04:16 PM
Last Post: Mondata
  How to link Sublime Text 3 Build system to Python 3.9 Using Windows 10 Fanman001 2 4,608 Mar-04-2021, 03:09 PM
Last Post: martpogs
  Sublime Text TechNitium 4 2,764 Jan-23-2021, 08:41 AM
Last Post: TechNitium
  sublime & intellisence luke83 0 1,632 Nov-20-2020, 08:26 PM
Last Post: luke83

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020