mgedmin / mgedmin/python-imports.vim

`import foo.bar` breaks loading of `python-imports.cfg`

Open
#15 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Vim Script
Stars
46
Forks
9
PR merge metrics
No merged PRs in 30d

Description

Since recently imports in the form `import foo.bar` don't work any more.

For instance I had this in my `python-imports.cfg`:
```
import pydantic
import pydantic.fields
```

The last line causes this:
```
Failed to load /Users/bari/.vim/python-imports.cfg: could not parse line 53: import pydantic.fields
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the failure with a python-imports.cfg containing both import pydantic and import pydantic.fields, then locate the parser for that configuration. Done means dotted imports load without the reported parse error while ordinary import lines continue to work.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, vim
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.