What is the PEP8 correct way for long method's name? I have a unit test with a self-describing method:
def success_if_buying_price_item_when_participating_and_progression_is_100_percent(self):
But unfortunately this (too long?) method reaches the 80 characters line limit.
Should I rename it and add a description in code or there is an other way?
I try to adhere to the style guide for Python code (also known as PEP 8). Accordingly, the preferred way to name a class is using CamelCase: Almost without exception, class names use the CapWords convention.
As mentioned, PEP 8 says to use lower_case_with_underscores for variables, methods and functions.
By convention, variable names start with a lower case character. The easiest way to make sure you are not adding lines longer than 80 characters wide is to always work inside a window that is exactly 80 characters wide. If your line starts wrapping around to the next line, its too long.
Should I rename it and add a description in code or there is an other way?
Yes, rename it and add a description. This code is dangerous, one could fall from its chair while another could have a heart attack. Please, rename that ASAP, you don't want to feel responsible.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With