This commit is contained in:
Kovid Goyal
2022-02-07 22:08:28 +05:30
parent e9ea7b13b6
commit 3c709a28f7
3 changed files with 5 additions and 3 deletions

View File

@@ -120,6 +120,8 @@ def generate_class(defn: Definition, loc: str) -> Tuple[str, str]:
tc_imports.add((func.__module__, func.__name__))
defval = repr(func(option.defval_as_string))
if len(defval) > 100:
defval += ' # noqa'
if option.macos_defval is not unset:
md = repr(func(option.macos_defval))
defval = f'{md} if is_macos else {defval}'