MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / update

Method update

scripts/update_copyright.py:18–35  ·  view source on GitHub ↗
(self, files)

Source from the content-addressed store, hash-verified

16 self._prefix = prefix or []
17
18 def update(self, files):
19 for file in files:
20 with open(file, encoding="utf-8-sig") as f:
21 lines = f.readlines()
22
23 index = -1
24 for i, line in enumerate(lines):
25 if line.startswith(self._comment_characters) or self.valid_copyright_notice_line(line, index, file):
26 index += 1
27 else:
28 break
29
30 if index == -1:
31 self.write_update_notice(file, lines)
32 else:
33 current = "".join(lines[: index + 1])
34 if current != self.copyright_notice(file):
35 self.write_update_notice(file, lines[index + 1 :])
36
37 def valid_copyright_notice_line(self, line, index, file):
38 return index + 1 < len(self.copyright_notice_lines(file)) and line.startswith(

Callers 15

update_filesFunction · 0.95
set_window_rectMethod · 0.80
jquery.min.jsFile · 0.80
calculate_hashFunction · 0.80
sha256_of_urlFunction · 0.80
_requestMethod · 0.80
to_capabilitiesMethod · 0.80
_addon_detailsMethod · 0.80
_build_headersMethod · 0.80

Calls 3

write_update_noticeMethod · 0.95
copyright_noticeMethod · 0.95