Avoid unnecessary assignment/append
This commit is contained in:
parent
028797bd24
commit
1b3898a4b8
|
@ -2305,9 +2305,7 @@ def _attrs_to_init_script(
|
||||||
If *frozen* is True, we cannot set the attributes directly so we use
|
If *frozen* is True, we cannot set the attributes directly so we use
|
||||||
a cached ``object.__setattr__``.
|
a cached ``object.__setattr__``.
|
||||||
"""
|
"""
|
||||||
lines = []
|
lines = ["self.__attrs_pre_init__()"] if pre_init else []
|
||||||
if pre_init:
|
|
||||||
lines.append("self.__attrs_pre_init__()")
|
|
||||||
|
|
||||||
if needs_cached_setattr:
|
if needs_cached_setattr:
|
||||||
lines.append(
|
lines.append(
|
||||||
|
|
Loading…
Reference in New Issue