Skip to content

More snekbox commands (black/mypy/flake8 etc) #1880

@wookie184

Description

@wookie184

Snekbox is pretty cool, we could use it to run a bunch of cool commands. python-discord/snekbox#108 allows us to pass in custom arguments, so we should be able to do things like python -m black -c "code" fairly easily. An example of this is the timeit command #1602

We could use this to create a bunch of utility commands to run useful python command line tools (each tool would need to be tested to ensure it works under snekbox's limitations though).

Some ideas for things we could add:

  • black
  • mypy
  • flake8
  • A dis command that runs dis.dis on the code
  • An ast command that runs ast.parse and then ast.dumps it.

One thing to be decided is if we would want to take input for options (e.g. line length for black), and if so how would we do that?

What are your thoughts on this, do we want any of these features? Anything else that hasn't been mentioned here? There are other tools like pyright or autopep8 we could add, although should we avoid adding too much bulk?

Metadata

Metadata

Assignees

No one assigned

    Labels

    a: utilityRelated to utility commands: (bot, eval, extensions, jams, reminders, snekbox, utils)p: 3 - lowLow Prioritys: planningDiscussing detailst: featureNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions