Return string argument with surrounding quotes, for serialization into Python code.
(s)
| 40 | |
| 41 | |
| 42 | def enquote(s): |
| 43 | """Return string argument with surrounding quotes, |
| 44 | for serialization into Python code.""" |
| 45 | if s: |
| 46 | if isinstance(s, str): |
| 47 | return f"'{s}'" |
| 48 | else: |
| 49 | return s |
| 50 | return None |
| 51 | |
| 52 | |
| 53 | def genProtectDirective(protect_str): |
no outgoing calls
no test coverage detected