Convert a camel case name to snake case. If the name would shadow a Python builtin, then append an underscore.
(name)
| 147 | |
| 148 | |
| 149 | def snake_case(name): |
| 150 | """Convert a camel case name to snake case. |
| 151 | |
| 152 | If the name would shadow a Python builtin, then append an underscore. |
| 153 | """ |
| 154 | name = inflection.underscore(name) |
| 155 | if is_builtin(name): |
| 156 | name += "_" |
| 157 | return name |
| 158 | |
| 159 | |
| 160 | def ref_to_python(ref): |
no test coverage detected