Formatting is okay.
It give warning because your dictionary values is a little long(uncommon) with split up text on new line.
Black is used much and have become more like standard way of formatting code in Python.
So eg Black will format it automatically like in code i show under.
For PyCharm look at Editor integration
Can also test online here Black Playground.
It give warning because your dictionary values is a little long(uncommon) with split up text on new line.
Black is used much and have become more like standard way of formatting code in Python.
So eg Black will format it automatically like in code i show under.
definitions = { "For loops": "For loops allow you to run a block of code repeatedly, just like while loops. However, for loops run" "a block of code a set number of times.", "Functions": "A function is a block of code repeatedly, just like while loops. However, for loops run a block of" "code a set number of times", "If statements": "An if statement runs a block of code based on whether or not a condition is true.", "Loops": "Loops check a condition and then run a code block. The loop will continue to check and run until a " "specified condition is reached.", "Python": "Python is a programming language that's currently becoming more and more powerful with every new library" " added to its collection.", }So a more common dict it will be format like this.
# Orginal d = {"apple": "fruit", "ball": "object", "cricket": "sports", 'car': 'vehicles'} # After Black d = { "apple": "fruit", "ball": "object", "cricket": "sports", "car": "vehicles", }It's normal to have a formatter integrated in Editor,i have used Black for many years in VS Code.
For PyCharm look at Editor integration
Can also test online here Black Playground.