(self, edits)
| 2267 | self.warning_given = True |
| 2268 | |
| 2269 | def prepare_to_edit(self, edits): |
| 2270 | res = [] |
| 2271 | seen = dict() |
| 2272 | |
| 2273 | self.need_commit_before_edits = set() |
| 2274 | |
| 2275 | for edit in edits: |
| 2276 | path = edit[0] |
| 2277 | if path is None: |
| 2278 | res.append(edit) |
| 2279 | continue |
| 2280 | if path == "python": |
| 2281 | dump(edits) |
| 2282 | if path in seen: |
| 2283 | allowed = seen[path] |
| 2284 | else: |
| 2285 | allowed = self.allowed_to_edit(path) |
| 2286 | seen[path] = allowed |
| 2287 | |
| 2288 | if allowed: |
| 2289 | res.append(edit) |
| 2290 | |
| 2291 | self.dirty_commit() |
| 2292 | self.need_commit_before_edits = set() |
| 2293 | |
| 2294 | return res |
| 2295 | |
| 2296 | def apply_updates(self): |
| 2297 | edited = set() |
no test coverage detected