MCPcopy Index your code
hub / github.com/plotly/plotly.py / validate_signature

Method validate_signature

_plotly_utils/png.py:1586–1596  ·  view source on GitHub ↗

If signature (header) has not been read then read and validate it; otherwise do nothing.

(self)

Source from the content-addressed store, hash-verified

1584 assert len(a) == 0
1585
1586 def validate_signature(self):
1587 """
1588 If signature (header) has not been read then read and
1589 validate it; otherwise do nothing.
1590 """
1591
1592 if self.signature:
1593 return
1594 self.signature = self.file.read(8)
1595 if self.signature != signature:
1596 raise FormatError("PNG file has invalid signature.")
1597
1598 def preamble(self, lenient=False):
1599 """

Callers 2

chunkMethod · 0.95
preambleMethod · 0.95

Calls 2

FormatErrorClass · 0.85
readMethod · 0.80

Tested by

no test coverage detected