| 1880 | return desc |
| 1881 | |
| 1882 | def vc_scalar(self, v): |
| 1883 | if isinstance(v, str): |
| 1884 | v = v.strip() |
| 1885 | |
| 1886 | if v in self.extras: |
| 1887 | return v |
| 1888 | |
| 1889 | if not isinstance(v, str): |
| 1890 | return None |
| 1891 | |
| 1892 | # To be generous we accept flags separated on plus ('+'), |
| 1893 | # or comma (',') and we accept whitespace around the flags |
| 1894 | split_vals = [e.strip() for e in re.split("[,+]", v)] |
| 1895 | |
| 1896 | # Are all flags valid names? |
| 1897 | if all(f in self.flags for f in split_vals): |
| 1898 | return "+".join(split_vals) |
| 1899 | else: |
| 1900 | return None |
| 1901 | |
| 1902 | def validate_coerce(self, v): |
| 1903 | if is_none_or_typed_array_spec(v): |