From 21ad1b7e7377690cf80a9bc5859061e7ed3c5600 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Thu, 30 Jan 2020 19:33:27 +0100 Subject: [PATCH] Add typing to pycharm templates --- pycharm_templates/command.vm | 8 +++++--- pycharm_templates/event.vm | 3 ++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/pycharm_templates/command.vm b/pycharm_templates/command.vm index c021ec79..e96b214a 100644 --- a/pycharm_templates/command.vm +++ b/pycharm_templates/command.vm @@ -1,13 +1,15 @@ +from typing import * import royalnet -from royalnet.commands import * +import royalnet.commands as rc + #set($CAPITALIZED_NAME = $NAME.substring(0,1).toUpperCase() + $NAME.substring(1)) -class ${CAPITALIZED_NAME}Command(Command): +class ${CAPITALIZED_NAME}Command(rc.Command): name: str = "$NAME" description: str = "" syntax: str = "" - async def run(self, args: CommandArgs, data: CommandData) -> None: + async def run(self, args: rc.CommandArgs, data: rc.CommandData) -> None: ... diff --git a/pycharm_templates/event.vm b/pycharm_templates/event.vm index 6919d0c4..1182ac76 100644 --- a/pycharm_templates/event.vm +++ b/pycharm_templates/event.vm @@ -1,5 +1,6 @@ from typing import * -from royalnet.commands import * +import royalnet +import royalnet.commands as rc #set($CAPITALIZED_NAME = $NAME.substring(0,1).toUpperCase() + $NAME.substring(1))