Пример #1
0
 async def help(self) -> Optional[HelpEntry]:
     """Return the help entry for this processor."""
     return HelpEntry(
         command=str(self.command),
         usage=str(self.command),
         description=""
     )
Пример #2
0
 async def help(self) -> Optional[HelpEntry]:
     return HelpEntry(
         command=str(self.command),
         usage="{} <origin> to <destination> [+offset]".format(self.command),
         description="Queries the passed traffic service for connections between "
                     "the origin and the destination. Optionally you can pass a "
                     "offset for the time in minutes. If no offset is passed "
                     "it will be set to 0 minutes (which means now)."
     )
Пример #3
0
 async def help(self) -> Optional[HelpEntry]:
     return HelpEntry(command="ping", usage="ping", description="")
Пример #4
0
async def test_formatter(ctx):
    dut = TextTable(usage_width=10, description_width=20)
    res = await dut(ctx, [HelpEntry("custom", "custom usage", "custom descr")])
    assert res == """+---------+--------------+--------------+
Пример #5
0
 async def help(self) -> Optional[HelpEntry]:
     return HelpEntry(
         command=str(self.command),
         usage=f"{self.command} on|off <domain>.<entity>",
         description="Calls home assistant to turn on resp. off the passed entity."
     )
Пример #6
0
 async def help(self) -> Optional[HelpEntry]:
     return HelpEntry(
         command=str(self.command),
         usage=str(self.command),
         description="Shows the version of homebot."
     )
Пример #7
0
 async def help(self) -> Optional[HelpEntry]:
     return HelpEntry(
         command=str(self.command),
         usage=str(self.command),
         description="Shows this help page."
     )
Пример #8
0
 async def help(self) -> Optional[HelpEntry]:
     return HelpEntry(
         command=str(self.command),
         usage="{} <set id>".format(self.command),
         description="Queries brickwatch.net for pricing information about the given set id"
     )