MCPcopy Create free account
hub / github.com/TeXworks/texworks / needs_update

Method needs_update

scripts/updateCopyrights.py:94–101  ·  view source on GitHub ↗

Returns True if the file needs updating, False otherwise.

(self)

Source from the content-addressed store, hash-verified

92 return not self.is_excluded() and self.one_of_replace_extensions()
93
94 def needs_update(self):
95 """Returns True if the file needs updating, False otherwise."""
96
97 self.content = open(self.filename).read()
98 self.matches = re.search(self.RE_PART_OF_TEXWORKS, self.content[:1000])
99 if self.matches is None:
100 print(' [WARNING] No Copyright notice found in {0}'.format(self.filename))
101 return self.matches
102
103 def update_copyright(self):
104 """Updates the copyright line in the file."""

Callers 1

mainFunction · 0.95

Calls 1

searchMethod · 0.45

Tested by

no test coverage detected