From edc2dd8c7155dbff868f9551f17f79b253835798 Mon Sep 17 00:00:00 2001 From: noah Date: Tue, 7 Dec 2021 09:50:03 +0100 Subject: [PATCH 1/3] consistent comment style --- sherlock/notify.py | 14 +++++++------- sherlock/result.py | 2 +- sherlock/sherlock.py | 2 +- sherlock/sites.py | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/sherlock/notify.py b/sherlock/notify.py index e3e4abbd..8307fe5e 100644 --- a/sherlock/notify.py +++ b/sherlock/notify.py @@ -27,7 +27,7 @@ class QueryNotify(): results for this query. Return Value: - Nothing. + N/A. """ self.result = result @@ -48,7 +48,7 @@ class QueryNotify(): Default is None. Return Value: - Nothing. + N/A. """ return @@ -65,7 +65,7 @@ class QueryNotify(): results for this query. Return Value: - Nothing. + N/A. """ self.result = result @@ -86,7 +86,7 @@ class QueryNotify(): Default is None. Return Value: - Nothing. + N/A. """ return @@ -125,7 +125,7 @@ class QueryNotifyPrint(QueryNotify): color -- Boolean indicating whether to color terminal output Return Value: - Nothing. + N/A. """ # Colorama module's initialization. @@ -149,7 +149,7 @@ class QueryNotifyPrint(QueryNotify): of queries are about. Return Value: - Nothing. + N/A. """ title = "Checking username" @@ -175,7 +175,7 @@ class QueryNotifyPrint(QueryNotify): results for this query. Return Value: - Nothing. + N/A. """ self.result = result diff --git a/sherlock/result.py b/sherlock/result.py index 6e6ddc1b..e74921cc 100644 --- a/sherlock/result.py +++ b/sherlock/result.py @@ -58,7 +58,7 @@ class QueryResult(): Default of None. Return Value: - Nothing. + N/A. """ self.username = username diff --git a/sherlock/sherlock.py b/sherlock/sherlock.py index b0051fcc..a69ed077 100644 --- a/sherlock/sherlock.py +++ b/sherlock/sherlock.py @@ -64,7 +64,7 @@ class SherlockFuturesSession(FuturesSession): kwargs -- Keyword arguments. Return Value: - N/A + N/A. """ resp.elapsed = monotonic() - start diff --git a/sherlock/sites.py b/sherlock/sites.py index de8eeece..ad36eb3c 100644 --- a/sherlock/sites.py +++ b/sherlock/sites.py @@ -46,7 +46,7 @@ class SiteInformation(): object for future use. Return Value: - Nothing. + N/A. """ self.name = name @@ -104,7 +104,7 @@ class SitesInformation(): default site list will be used. Return Value: - Nothing. + N/A. """ if data_file_path is None: From a29df87d39e87fa464bf248e1b4b98a057a86730 Mon Sep 17 00:00:00 2001 From: noah Date: Tue, 7 Dec 2021 09:51:04 +0100 Subject: [PATCH 2/3] fix typo --- sherlock/sherlock.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sherlock/sherlock.py b/sherlock/sherlock.py index a69ed077..8b755da8 100644 --- a/sherlock/sherlock.py +++ b/sherlock/sherlock.py @@ -532,7 +532,7 @@ def main(): f"You are running version {local_version}. Version {remote_version} is available at https://git.io/sherlock") except Exception as error: - print(f"A problem occured while checking for an update: {error}") + print(f"A problem occurred while checking for an update: {error}") # Argument check From dc33c321d6f9e967a827ad3dadcbc6a55fb242c9 Mon Sep 17 00:00:00 2001 From: noah Date: Fri, 10 Dec 2021 11:04:08 +0100 Subject: [PATCH 3/3] replace "N/A" with "Nothing" in docstrings --- sherlock/notify.py | 14 +++++++------- sherlock/result.py | 2 +- sherlock/sherlock.py | 2 +- sherlock/sites.py | 4 ++-- sherlock/tests/all.py | 26 +++++++++++++------------- sherlock/tests/base.py | 8 ++++---- 6 files changed, 28 insertions(+), 28 deletions(-) diff --git a/sherlock/notify.py b/sherlock/notify.py index 8307fe5e..e3e4abbd 100644 --- a/sherlock/notify.py +++ b/sherlock/notify.py @@ -27,7 +27,7 @@ class QueryNotify(): results for this query. Return Value: - N/A. + Nothing. """ self.result = result @@ -48,7 +48,7 @@ class QueryNotify(): Default is None. Return Value: - N/A. + Nothing. """ return @@ -65,7 +65,7 @@ class QueryNotify(): results for this query. Return Value: - N/A. + Nothing. """ self.result = result @@ -86,7 +86,7 @@ class QueryNotify(): Default is None. Return Value: - N/A. + Nothing. """ return @@ -125,7 +125,7 @@ class QueryNotifyPrint(QueryNotify): color -- Boolean indicating whether to color terminal output Return Value: - N/A. + Nothing. """ # Colorama module's initialization. @@ -149,7 +149,7 @@ class QueryNotifyPrint(QueryNotify): of queries are about. Return Value: - N/A. + Nothing. """ title = "Checking username" @@ -175,7 +175,7 @@ class QueryNotifyPrint(QueryNotify): results for this query. Return Value: - N/A. + Nothing. """ self.result = result diff --git a/sherlock/result.py b/sherlock/result.py index e74921cc..6e6ddc1b 100644 --- a/sherlock/result.py +++ b/sherlock/result.py @@ -58,7 +58,7 @@ class QueryResult(): Default of None. Return Value: - N/A. + Nothing. """ self.username = username diff --git a/sherlock/sherlock.py b/sherlock/sherlock.py index 8b755da8..ef2347b2 100644 --- a/sherlock/sherlock.py +++ b/sherlock/sherlock.py @@ -64,7 +64,7 @@ class SherlockFuturesSession(FuturesSession): kwargs -- Keyword arguments. Return Value: - N/A. + Nothing. """ resp.elapsed = monotonic() - start diff --git a/sherlock/sites.py b/sherlock/sites.py index ad36eb3c..de8eeece 100644 --- a/sherlock/sites.py +++ b/sherlock/sites.py @@ -46,7 +46,7 @@ class SiteInformation(): object for future use. Return Value: - N/A. + Nothing. """ self.name = name @@ -104,7 +104,7 @@ class SitesInformation(): default site list will be used. Return Value: - N/A. + Nothing. """ if data_file_path is None: diff --git a/sherlock/tests/all.py b/sherlock/tests/all.py index b7b7f912..3299c497 100644 --- a/sherlock/tests/all.py +++ b/sherlock/tests/all.py @@ -17,7 +17,7 @@ class SherlockDetectTests(SherlockBaseTest): self -- This object. Return Value: - N/A. + Nothing. Will trigger an assert if detection mechanism did not work as expected. """ @@ -44,7 +44,7 @@ class SherlockDetectTests(SherlockBaseTest): self -- This object. Return Value: - N/A. + Nothing. Will trigger an assert if detection mechanism did not work as expected. """ @@ -71,7 +71,7 @@ class SherlockDetectTests(SherlockBaseTest): self -- This object. Return Value: - N/A. + Nothing. Will trigger an assert if detection mechanism did not work as expected. """ @@ -98,7 +98,7 @@ class SherlockDetectTests(SherlockBaseTest): self -- This object. Return Value: - N/A. + Nothing. Will trigger an assert if detection mechanism did not work as expected. """ @@ -125,7 +125,7 @@ class SherlockDetectTests(SherlockBaseTest): self -- This object. Return Value: - N/A. + Nothing. Will trigger an assert if detection mechanism did not work as expected. """ @@ -152,7 +152,7 @@ class SherlockDetectTests(SherlockBaseTest): self -- This object. Return Value: - N/A. + Nothing. Will trigger an assert if detection mechanism did not work as expected. """ @@ -181,7 +181,7 @@ class SherlockSiteCoverageTests(SherlockBaseTest): self -- This object. Return Value: - N/A. + Nothing. Will trigger an assert if detection mechanism did not work as expected. """ @@ -199,7 +199,7 @@ class SherlockSiteCoverageTests(SherlockBaseTest): self -- This object. Return Value: - N/A. + Nothing. Will trigger an assert if detection mechanism did not work as expected. """ @@ -217,7 +217,7 @@ class SherlockSiteCoverageTests(SherlockBaseTest): self -- This object. Return Value: - N/A. + Nothing. Will trigger an assert if detection mechanism did not work as expected. """ @@ -235,7 +235,7 @@ class SherlockSiteCoverageTests(SherlockBaseTest): self -- This object. Return Value: - N/A. + Nothing. Will trigger an assert if detection mechanism did not work as expected. """ @@ -253,7 +253,7 @@ class SherlockSiteCoverageTests(SherlockBaseTest): self -- This object. Return Value: - N/A. + Nothing. Will trigger an assert if detection mechanism did not work as expected. """ @@ -271,7 +271,7 @@ class SherlockSiteCoverageTests(SherlockBaseTest): self -- This object. Return Value: - N/A. + Nothing. Will trigger an assert if detection mechanism did not work as expected. """ @@ -288,7 +288,7 @@ class SherlockSiteCoverageTests(SherlockBaseTest): self -- This object. Return Value: - N/A. + Nothing. Will trigger an assert if we do not have total coverage. """ diff --git a/sherlock/tests/base.py b/sherlock/tests/base.py index 190aaaae..20605d20 100644 --- a/sherlock/tests/base.py +++ b/sherlock/tests/base.py @@ -23,7 +23,7 @@ class SherlockBaseTest(unittest.TestCase): self -- This object. Return Value: - N/A. + Nothing. """ #This ignores the ResourceWarning from an unclosed SSLSocket. @@ -97,7 +97,7 @@ class SherlockBaseTest(unittest.TestCase): or non-existence. Return Value: - N/A. + Nothing. Will trigger an assert if Username does not have the expected existence state. """ @@ -154,7 +154,7 @@ class SherlockBaseTest(unittest.TestCase): or non-existence. Return Value: - N/A. + Nothing. Runs tests on all sites using the indicated detection algorithm and which also has test vectors specified. Will trigger an assert if Username does not have the expected @@ -208,7 +208,7 @@ class SherlockBaseTest(unittest.TestCase): self -- This object. Return Value: - N/A. + Nothing. Counts up all Sites with full test data available. Will trigger an assert if any Site does not have test coverage. """