From 3d4d36e5b4b61cbbee93032425c822f2f478449c Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Mon, 20 May 2024 22:06:34 -0400 Subject: Greatly expand Repl.py This adds a few things I found from [this gist][1], but cleaned up quite a bit I think, and designed a bit closer to the ghci user experience. Along the way I figured out what ruff settings will autoformat my imports in one alphabetized section, rather than splitting it into multiple sections for builtins and external deps. So I made that change in the whole repo, but there weren't too many changes. [1]: https://gist.github.com/aliles/1153926 --- Biz/Mynion.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'Biz/Mynion.py') diff --git a/Biz/Mynion.py b/Biz/Mynion.py index 3b80f5f..83d427b 100644 --- a/Biz/Mynion.py +++ b/Biz/Mynion.py @@ -4,19 +4,17 @@ # : dep exllama # : dep slixmpp import argparse +import Biz.Log import dataclasses +import exllama # type: ignore[import] import logging import os import pathlib -import sys -import typing - -import exllama # type: ignore[import] import slixmpp import slixmpp.exceptions +import sys import torch - -import Biz.Log +import typing def smoosh(s: str) -> str: -- cgit v1.2.3