SepShr / MLCSHE

This repo houses the ML-Component Systemic Hazard Envelope project, or MILSCHE (pronounced /'mɪlʃ/).
MIT License
3 stars 0 forks source link

Hard wrap at 120? #12

Closed donghwan-shin closed 3 years ago

donghwan-shin commented 3 years ago

https://github.com/SepShr/MLCSHE/blob/cc5018836483c45b498e35d8bc4eff32a81e194f/CCEA.py#L214

It seems your editor has a small value for the hard wrap. Since we often have long variable/function names, I would suggest using a larger value, say 120, for it.

Then, the code will be look like this:

    complete_solutions_set = \
        collaborate_archive(a1, p2, joint_class, first_component_class) \
        + collaborate_archive(a2, p1, joint_class, first_component_class) \
        + collaborate_complement(p1, a1, p2, min_num_evals, joint_class, first_component_class) \
        + collaborate_complement(p2, a2, p1, min_num_evals, joint_class, first_component_class)
SepShr commented 3 years ago

According to PEP 8 https://www.python.org/dev/peps/pep-0008/#id17, codes should be wrapped at 79. Though, they can be increased to 99 chars at most pending team decision. Additionally, all docstrings should be limited 72 chars. All in all, I can extend the hard wrap for code to 99, which are already wrapped at 80. Also all docstrings should be updated, since they are currently wrapped at 82.

SepShr commented 3 years ago

We will be following PEP8 guidelines on code wrapping conventions. This issue will be closed.