File tree Expand file tree Collapse file tree 2 files changed +2
-8
lines changed Expand file tree Collapse file tree 2 files changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -152,7 +152,6 @@ def init(
152
152
file_path ,
153
153
toml_path ,
154
154
script_location = toml_script_location_directory ,
155
- append_delimiter = b"\n \n " ,
156
155
)
157
156
else :
158
157
script ._generate_template (
Original file line number Diff line number Diff line change @@ -27,7 +27,6 @@ def template_to_file(
27
27
output_encoding : str ,
28
28
* ,
29
29
append : bool = False ,
30
- append_delimiter : Optional [bytes ] = None ,
31
30
** kw : Any ,
32
31
) -> None :
33
32
template = Template (filename = _preserving_path_as_str (template_file ))
@@ -46,13 +45,9 @@ def template_to_file(
46
45
"template-oriented traceback." % fname
47
46
)
48
47
else :
49
- if append and append_delimiter :
50
- if os .path .exists (dest ):
51
- with open (dest , "rb" ) as f :
52
- _exsiting = f .read ()
53
- if not _exsiting .endswith (append_delimiter ):
54
- output = append_delimiter + output
55
48
with open (dest , "ab" if append else "wb" ) as f :
49
+ if append :
50
+ f .write (b"\n \n " )
56
51
f .write (output )
57
52
58
53
You can’t perform that action at this time.
0 commit comments