[PATCH 4 of 7 WIPv2] cli: convert 'gearbox ishell' into 'kallithea-cli ishell'

Thomas De Schampheleire patrickdepinguin at gmail.com
Fri Oct 12 18:32:42 UTC 2018


El mar., 9 oct. 2018 a las 12:02, Mads Kiilerich
(<mads at kiilerich.com>) escribió:
>
> On 10/8/18 9:57 PM, Thomas De Schampheleire wrote:
> > # HG changeset patch
> > # User Thomas De Schampheleire <thomas.de_schampheleire at nokia.com>
> > # Date 1538422696 -7200
> > #      Mon Oct 01 21:38:16 2018 +0200
> > # Node ID 14d0a7fc45f3c5dd7333d3f93335d5b556e7c4f0
> > # Parent  4208df04508892ce4612b0a392345176fe946e6c
> > cli: convert 'gearbox ishell' into 'kallithea-cli ishell'
> >
> > --
> >
> > Question: what is the purpose of the imports 'used in IPython shell' ?
> > I don't see a difference when e.g. removing the import of datetime.
>
>
> I guess it is to explicitly make sure datetime can be used in ishell
> without importing it first. datetime is probably already imported
> through other dependencies. So, perhaps nice to have explicit ... but it
> also doesn't seem like a very essential module, so perhaps not worth it
> to have explicit ...

Yes, I don't see much value for default imports of time, datetime and shutil.
Importing kallithea.model.db.* but not 'kallithea' itself seems odd too.
It feels like these imports are tailored to some specific use case
that can be carried out with ishell.
Personally I have not yet used it, did you? How/why?

/Thomas


More information about the kallithea-general mailing list