Python Forum

Full Version: Sublime Text + Anaconda not indenting Python code correctly
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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?