@@ -74,18 +74,18 @@ class Worker:
74
74
src_path : Optional [str ] = None
75
75
"""String that can be resolved to a template path, be it local or remote.
76
76
77
- See [Template.url][copier.template.Template.url] for more details .
77
+ See [Template.url][copier.template.Template.url].
78
78
79
- If it is `None`, then it means that you are [updating a
80
- project](../updating.md), and the original `src_path` will be obtained from
81
- [the answers file](../configuring.md# the-answers- file) .
79
+ If it is `None`, then it means that you are [updating a project][updating-a-project],
80
+ and the original `src_path` will be obtained from
81
+ [the answers file][ the-copier-answersyml- file] .
82
82
"""
83
83
84
84
dst_path : Path = field (default = "." )
85
85
"""Destination path where to render the subproject."""
86
86
87
87
answers_file : Optional [RelativePath ] = None
88
- """Indicates the path for [the answers file](../configuring.md# the-answers- file) .
88
+ """Indicates the path for [the answers file][ the-copier-answersyml- file] .
89
89
90
90
The path must be relative to [dst_path][copier.main.Worker.dst_path].
91
91
@@ -102,38 +102,46 @@ class Worker:
102
102
exclude : StrSeq = ()
103
103
"""Additional file exclusion patterns.
104
104
105
- See [copier.template.Template. exclude][] for more details .
105
+ See [exclude][].
106
106
"""
107
107
108
108
use_prereleases : bool = False
109
109
"""Consider prereleases when detecting the *latest* one?
110
110
111
- See [copier.template.Template. use_prereleases][].
111
+ See [use_prereleases][].
112
112
113
113
Useless if specifying a [vcs_ref][copier.main.Worker.vcs_ref].
114
114
"""
115
115
116
116
skip_if_exists : StrSeq = ()
117
117
"""Additional file skip patterns.
118
118
119
- See [copier.template.Template. skip_if_exists][] for more details .
119
+ See [skip_if_exists][].
120
120
"""
121
121
122
122
cleanup_on_error : bool = True
123
123
"""Delete [dst_path][copier.main.Worker.dst_path] if there's an error?
124
124
125
- It only applies when [dst_path][copier.main.Worker.dst_path] was created by
126
- this process. Preexisting subprojects are never cleaned up.
125
+ See [cleanup_on_error][].
127
126
"""
128
127
129
128
force : bool = False
130
- """When `True`, disable all user interactions."""
129
+ """When `True`, disable all user interactions.
130
+
131
+ See [force][].
132
+ """
131
133
132
134
pretend : bool = False
133
- """When `True`, produce no real rendering."""
135
+ """When `True`, produce no real rendering.
136
+
137
+ See [pretend][].
138
+ """
134
139
135
140
quiet : bool = False
136
- """When `True`, disable all output."""
141
+ """When `True`, disable all output.
142
+
143
+ See [quiet][].
144
+ """
137
145
138
146
def _answers_to_remember (self ) -> Mapping :
139
147
"""Get only answers that will be remembered in the copier answers file."""
@@ -533,6 +541,8 @@ def run_copy(self) -> None:
533
541
created. Otherwise, [src_path][copier.main.Worker.src_path] be rendered
534
542
directly into it, without worrying about evolving what was there
535
543
already.
544
+
545
+ See [generating a project][generating-a-project].
536
546
"""
537
547
was_existing = self .subproject .local_abspath .exists ()
538
548
if not self .quiet :
@@ -559,20 +569,9 @@ def run_copy(self) -> None:
559
569
print ("" ) # padding space
560
570
561
571
def run_update (self ) -> None :
562
- """Update the subproject.
563
-
564
- Before running this, [dst_path][copier.main.Worker.dst_path] must exist
565
- and must contain an already-applied template, with a valid [copier
566
- answers](../configuring.md#the-answers-file) file that points to a
567
- versioned git template.
568
-
569
- Copier will download the old template, render it with last answers,
570
- download the latest version, apply it to the current subproject, and
571
- compare both renders to apply a smart diff that, in practice, applies
572
- the evolution of the template dynamically over the subproject.
572
+ """Update a subproject that was already generated.
573
573
574
- In case of conflicts, `.rej` files will be dropped, next to the
575
- conflicting ones.
574
+ See [updating a project][updating-a-project].
576
575
"""
577
576
# Check all you need is there
578
577
if self .subproject .vcs != "git" :
0 commit comments