(attr_name)
| 43 | |
| 44 | |
| 45 | def sorted_attributes_key(attr_name): |
| 46 | if attr_name.startswith("__"): |
| 47 | if attr_name.endswith("__"): |
| 48 | # __ double under before and after __ |
| 49 | return (3, attr_name) |
| 50 | else: |
| 51 | # __ double under before |
| 52 | return (2, attr_name) |
| 53 | elif attr_name.startswith("_"): |
| 54 | # _ single under |
| 55 | return (1, attr_name) |
| 56 | else: |
| 57 | # Regular (Before anything) |
| 58 | return (0, attr_name) |
| 59 | |
| 60 | |
| 61 | # ======================================================================================================================= |
no outgoing calls
no test coverage detected