question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Use absolute imports

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
Shougocommented, Aug 6, 2020

Other reviwers eye are needed.

0reactions
farisachugthaicommented, Aug 6, 2020

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

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

from being merged?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Absolute vs Relative Imports in Python
An absolute import specifies the resource to be imported using its full path from the project's root folder. Syntax and Practical Examples. Let's...
Read more >
Absolute and Relative Imports in Python - GeeksforGeeks
Absolute import involves a full path i.e., from the project's root folder to the desired module. An absolute import state that the resource...
Read more >
Why and How to Use Absolute Imports in React
Using absolute imports to better organize your React project is a great way. Relative imports are hard to follow and break during ...
Read more >
What is absolute import in python? - Stack Overflow
Relative {imports, paths, URLs} are exactly what they say they are: they're relative to their current location. That is, if the directory ...
Read more >
Making Life Easier with Absolute Imports - React in Javascript ...
According to create-react-app Docs, We can use absolute imports in our react project by configuring a jsconfig.json / tsconfig.json (for ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found