Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

1.2K
Views
How do I format a multi-line TODO comment in PyCharm?

I want to add a multi-line TODO comment to my PyCharm project.

# TODO: Multiple errors can be wrapped inside an exception.
#       WfcApiException should do recursive error checking to locate
#       and store an arbitrary number of nested errors.

Unfortunately, PyCharm only recognizes the first line as a TODO comment. Any following lines are viewed as standard Python comments.

Failed attempt at a multi-line TODO statement in PyCharm

What is the correct way to format a multi-line TODO comment in PyCharm?

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

Pycharm 2018.3 does support multiline todo, yay!

https://youtu.be/5gJ7_3wCfUk?t=65

https://blog.jetbrains.com/pycharm/2018/11/pycharm-2018-3-out-now/

So, using your TODO comment:

# TODO: Multiple errors can be wrapped inside an exception.
#       WfcApiException should do recursive error checking to locate
#       and store an arbitrary number of nested errors.

yields:

enter image description here

Actually, you only need to indent the following lines one character to the right of the TODO so this would be just on the limit from being detected:

enter image description here

And the todo is captured as a single item, of course:

enter image description here

over 4 years ago · Santiago Trujillo Report

0

Update: It appears JetBrains added this feature, see payala's answer

PyCharm does not support multi-line TODOs, one alternative option would be to use a multi line string

'''
TODO foobar
foobar
'''

This won't have the TODO highlighting like # TODO foo, but it will stand out from the rest of your code with the string highlighting.

You could also try

# TODO -----------------
# TODO  foobar this
# TODO  comment 
# TODO  comment
# TODO  comment
# TODO ------------------

If you have a particularly chunky and important TODO note.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!