Skip to content

Commit

Permalink
[private key plugin] Update docstring of analyze
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinHock committed Apr 6, 2018
1 parent 4f76df4 commit 1925cdb
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions detect_secrets/plugins/private_key.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,14 @@ class PrivateKeyDetector(BasePlugin):
def analyze(self, file, filename):
"""We override this, because we're only looking at the first line.
Though this doesn't strictly follow the schema of the parent function,
all that really matters is that each secret within this file scanned
has a unique key. Since we're only expecting at most one secret from
this file, by definition any key is a unique key, so we good.
:param file: The File object itself.
:param filename: string; filename of File object, used for creating
PotentialSecret objects
:returns dictionary representation of set (for random access by hash)
{ detect_secrets.core.potential_secret.__hash__:
detect_secrets.core.potential_secret }
"""

return self.analyze_string(
file.readline(),
1,
Expand Down

0 comments on commit 1925cdb

Please sign in to comment.