GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — rope autoimport code action error. · Issue #647 · python-lsp/python-lsp-server

rope autoimport code action error. #647

New issue
Copy link
New issue
Copy link
Open
Open
rope autoimport code action error.#647
Copy link

Description

@loujiaye
loujiaye
opened on May 19, 2025
Issue body actions

I use emacs`s lsp-pylsp. When i want to use autoimport function, it suggests path with src.How can i right configurate.

Image

path tree

.
├── requirements.txt
├── src
│   ├── pycache
│   ├── app.py
│   ├── config
│   ├── data
│   ├── func
│   │   ├── init.py
│   │   ├── pycache
│   │   └── rule.py
│   ├── image2config
│   │   ├── init.py
│   │   └── page.py
│   ├── model
│   │   ├── pycache
│   │   ├── database.py
│   │   ├── device.py
│   │   ├── pagetree.py
│   │   └── project.py
│   ├── other
│   ├── resource
│   │   ├── copyposition.ui
│   │   ├── copypositiondialog.ui
│   │   ├── devicemanage.ui
│   │   ├── imagedisplay.ui
│   │   ├── imageedit.ui
│   │   ├── mainpage.ui
│   │   ├── pagedisplay.ui
│   │   ├── pageedit.ui
│   │   ├── positioncompare.ui
│   │   ├── positiondialog.ui
│   │   ├── projectdialog.ui
│   │   └── projectlist.ui
│   ├── ui
│   │   ├── init.py
│   │   ├── pycache
│   │   ├── devicemanageproxy.py
│   │   ├── imagedisplayproxy.py
│   │   ├── imageeditproxy.py
│   │   ├── mainpageproxy.py
│   │   ├── pagedisplayproxy.py
│   │   ├── pageeditproxy.py
│   │   ├── positiondialogproxy.py
│   │   ├── projectdialogproxy.py
│   │   └── projectlistproxy.py
│   └── util
│   ├── pycache
│   ├── func.py
│   └── imageutil.py
└── tests
└── util
├── pycache
├── func_test.py
└── imageutil_test.py

.dir-locals.el

((python-mode .
((lsp-pylsp-configuration
. (:python (:analysis (:extraPaths ["src"]))))
(lsp-pylsp-plugins-flake8-ignore . ["E111" "E121" "E114" "E501"])
(lsp-pylsp-plugins-jedi-environment . "/Users/tong/program/project/xianyu/venv")
(lsp-pylsp-plugins-jedi-completion-extra-paths . ["src"])
(lsp-pylsp-plugins-mypy-overrides . ["--python-executable" "/Users/tong/program/project/xianyu/venv/bin/python" t])
(lsp-disabled-clients . (pyright))
)))

pyproject.toml

[tool.pylsp]
plugins.jedi_completion = { enabled = true, extra_paths = ["src"] }
plugins.pylint = { enabled = true, args = ["--max-line-length=100"] }
plugins.autopep8 = { enabled = true }
plugins.black = { enabled = true }
plugins.rope = { enabled = true }

[tool.rope]
enabled = true
python_path = ["/Users/tong/program/project/xianyu/venv/bin/python"]
save_objectdb = true
split_imports = true
source_folders = ["src"] # 源码目录
ignored_paths = ["tests"] # 排除目录

[tool.jedi_completion]
cache_for = ['PySide6', 'PySide6.QtWidgets']
extra_paths = ["src"]

[tool.flake8]
enable-extensions = "D" # 启用 docstring 规则(flake8-docstrings)
exclude = ".git,pycache,venv,test" # 排除这些目录

[tool.pytest.ini_options]
addopts = "-s"
testpaths = ["tests"]
pythonpath = ["src"]

[tool.ruff]
src = ["src"]

[tool.mypy]
mypy_path = "src"
files = ["src", "tests"]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.