From d27e8cf73aeb8b7eba95060151922a6202a7468e Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Fri, 3 Jan 2020 00:55:14 -0500 Subject: [PATCH] pylint fix in lbry/error/generate.py --- lbry/error/generate.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lbry/error/generate.py b/lbry/error/generate.py index cda8a922b..3d28b0008 100644 --- a/lbry/error/generate.py +++ b/lbry/error/generate.py @@ -54,7 +54,8 @@ class ErrorClass: args.append(arg) return args - def get_doc_string(self, doc): + @staticmethod + def get_doc_string(doc): if doc: return f'\n{INDENT}"""\n{indent(fill(doc, 100), INDENT)}\n{INDENT}"""' return "" @@ -139,7 +140,7 @@ def analyze(): print(f' - {error}') -if __name__ == "__main__": +def main(): parser = argparse.ArgumentParser() parser.add_argument("action", choices=['generate', 'analyze']) args = parser.parse_args() @@ -147,3 +148,7 @@ if __name__ == "__main__": analyze() elif args.action == "generate": generate(sys.stdout) + + +if __name__ == "__main__": + main()