kislyuk / argcomplete

Python and tab completion, better together.
https://kislyuk.github.io/argcomplete/
Apache License 2.0
1.39k stars 129 forks source link

Typings? #377

Closed tony closed 1 year ago

tony commented 1 year ago

Interested in typings?

Downstream this would make completions nicer and let users check argcomplete usage for correctness

(I am happy to contribute them, if so.)

kislyuk commented 1 year ago

Hi, thanks for the note. Yes, type hint contributions are welcome (as long as they are added to the code and not as separate stub files, which are hard to maintain).

tony commented 1 year ago

Hi, thanks for the note. Yes, type hint contributions are welcome (as long as they are added to the code and not as separate stub files, which are hard to maintain).

Bikeshed: do you have a preference for the way its imported?

via a short namespace (e.g. flask style, 2):

import typing as t

def fn(val; str, items: t.List[str]):
    ...

vs

from typing import List

def fn(val; str, items: List[str]):
    ...

vs anything else?

In my libs I ended up picking flask's style: import typing as t.

kislyuk commented 1 year ago

No preference - feel free to use either style.