Skip to content
This repository has been archived by the owner on Apr 9, 2023. It is now read-only.

Type annotations and formatter #9

Closed
why-not-try-calmer opened this issue Jul 12, 2021 · 6 comments
Closed

Type annotations and formatter #9

why-not-try-calmer opened this issue Jul 12, 2021 · 6 comments

Comments

@why-not-try-calmer
Copy link
Collaborator

why-not-try-calmer commented Jul 12, 2021

I am using Pylance to guide/enforce type annotations (as per Python 3.8.10) and autopep8 as formatter.

  1. Do you agree to enforce type annotations at least on function signatures?
  2. Do you agree to use Pylance for it?
  3. Which formatter do you prefer?
@muadib
Copy link
Collaborator

muadib commented Jul 12, 2021

I'm OK with 1. and 2.
With that said, I'm in the process of introducing myself to Python, so I'll be setting up Pylance :)

@why-not-try-calmer
Copy link
Collaborator Author

I'm OK with 1. and 2.
With that said, I'm in the process of introducing myself to Python, so I'll be setting up Pylance :)

Great!

@KaratekHD
Copy link
Member

I'm actually not really happy with pylance. It would require me to use VS Code for development, which I generally dislike. There once was a plugin for Vim for Pylance, but Microsoft killed it. So if you guys totally want to use it I can life with it, but I'm.not happy with it

@why-not-try-calmer
Copy link
Collaborator Author

why-not-try-calmer commented Jul 13, 2021

Pylance (the language server / VSCode extension) uses the Pyright type checker, which is available for Vim. Would that be Ok for you?

At the end of the day it does not matter which tool you use as long as it applies the same conventions as Pyright, which is I think one of the most up-to-date (https://github.com/microsoft/pyright#type-checking-features) type checker for Python.

@KaratekHD
Copy link
Member

I will look into that, but probably for the reasons stated on Telegram only starting from Thursday the 22nd.

@why-not-try-calmer
Copy link
Collaborator Author

why-not-try-calmer commented Jul 23, 2021

Any news on Pylance / Pyright?

As for the formatter, I myself am unhappy with autopep8. The standard is good but concretely it really overdoes things and is not always consistent as far as vertical spacing. Perhaps it's a configuration issue. Will keep you posted.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants