max-line-length #6575
-
How to change jupyter notebook max-line-length? I use pep8 to pretty-format code. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Greetings @LixiangHello You can change the maximum line length for Jupyter Notebook by configuring the pep8 formatter. Here's how you can do it:
After completing these steps, you can use the %load_ext pep8_magic command to load the pep8_magic extension in your Jupyter Notebook. Once the extension is loaded, you can use the %config command to set the maximum line length. Here's an example: In this example, we've set the maximum line length to 120 characters. You can adjust this value to suit your needs. Once you've set the maximum line length, you can use the %pep8 command to format your code according to the pep8 style guide. |
Beta Was this translation helpful? Give feedback.
Greetings @LixiangHello
You can change the maximum line length for Jupyter Notebook by configuring the pep8 formatter. Here's how you can do it: