Skip to content

Sourcery refactored master branch #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions cmd/clef/pythonsigner.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ def __init__(self, input, output):

def receive_message(self):
data = self.input.readline()
print(">> {}".format(data))
print(f">> {data}")
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function PipeTransport.receive_message refactored with the following changes:

return None, urlparse.unquote(data)

def send_reply(self, context, reply):
reply = str(reply, "utf-8")
print("<< {}".format(reply))
self.output.write("{}\n".format(reply))
print(f"<< {reply}")
self.output.write(f"{reply}\n")
Comment on lines -54 to +55
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function PipeTransport.send_reply refactored with the following changes:



def sanitize(txt, limit=100):
Expand Down Expand Up @@ -281,17 +281,14 @@ def onInputRequired(self, req):
)
)
isPassword = req.get("isPassword")
if not isPassword:
return {"text": input()}

return ""
return {"text": input()} if not isPassword else ""
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function StdIOHandler.onInputRequired refactored with the following changes:



def main(args):
cmd = ["clef", "--stdio-ui"]
if len(args) > 0 and args[0] == "test":
cmd.extend(["--stdio-ui-test"])
print("cmd: {}".format(" ".join(cmd)))
print(f'cmd: {" ".join(cmd)}')
Comment on lines -294 to +291
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function main refactored with the following changes:


dispatcher = RPCDispatcher()
dispatcher.register_instance(StdIOHandler(), "ui_")
Expand Down