neovim / pynvim

Python client and plugin host for Nvim
http://pynvim.readthedocs.io/en/latest/
Apache License 2.0
1.52k stars 118 forks source link

Use absolute imports #450

Closed farisachugthai closed 4 years ago

farisachugthai commented 4 years ago

Throughout the repository, relative imports are used.

As a result, simple and useful checks for the repository are missed.

For example:

python3 -m doctest api/nvim.py

Can't work because the internal imports are relative; however, if all the imports were refactored from


from .buffer import Buffer

# to

from pynvim.buffer import Buffer

simple checks like this would be possible.

Shougo commented 4 years ago

Can you send the PR for it?

farisachugthai commented 4 years ago

Would you want me to change all of the imports throughout the entire repository or focus on certain files?

The diff will be large if I change the repository; however, I see absolutely no downside to doing so.

Either way I'd love to send a PR! Just let me know what you're thinking.

Shougo commented 4 years ago

I also think absolute imports are better.

farisachugthai commented 4 years ago

I'm glad you agree. Are there any concerns that would stop

https://github.com/neovim/pynvim/pull/451

from being merged?

Shougo commented 4 years ago

Other reviwers eye are needed.