Code Monkey home page Code Monkey logo

inpromptu's People

Contributors

poofjunior avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

inpromptu's Issues

Add formatting options for printing

It would be nice to display floats or data structures containing floats to a particular amount of precision, rather than simply taking the default.

Add optional Hierarchy to commands from inherited classes

Currently, all functions are collected from all parent classes and presented together as one flat set of options. Consider a means of presenting them grouped by the class that inherits them.

Example 1:

Parent Class Methods:
function_a              function_b               function_c
Child Class Methods:
function_d              function_e               function_f

Support @property setters

Currently only @property decorators, which create "getters" are supported, but "setters" are not.

Doing so wouldn't take too much effort. The only edge case arises when our setter has a default argument.

@property
def greeting(self):
    return self.the_greeting

@greeting.setter
def greeting(self, new_greeting: str = ""):
    self.the_greeting = new_greeting

When we run the greeting command in the prompt with no arguments, are we "getting" the value or "setting" the value to the default value? We'll need to be explicit about this in the docs.

Support Literal type hints

Literal types are type hints that produce a specific set of hinted values for parameters. These should be tab-completable (within reason).

See PEP-586

from typing import Literal, get_args
valid_modes = Literal['r', 'w']

get_args(valid_modes)

should return

('r', 'w')

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.