zed icon indicating copy to clipboard operation
zed copied to clipboard

Cannot use autocompletion on module named "licenses.py"

Open mak448a opened this issue 1 year ago • 3 comments

Check for existing issues

  • [X] Completed

Describe the bug / provide steps to reproduce it

Make a file called licenses.py with a class named "LicensesUI." Import that class from a file called main.py. It should have squiggly underlines saying Pyright: "LicensesUI" is unknown import symbol.

image

If needed, here's some dummy content for you to try with.

main.py

from licenses import LicensesUI

licenses.py

class LicensesUI:
    def __init__(self):
        print("init")

Environment

Zed: v0.149.3 (Zed) OS: Linux Wayland fedora 40 Memory: 15.1 GiB Architecture: x86_64 GPU: Intel(R) UHD Graphics 620 (KBL GT2) || Intel open-source Mesa driver || Mesa 24.1.6

Zed Settings

// Zed settings
//
// For information on how to configure Zed, see the Zed
// documentation: https://zed.dev/docs/configuring-zed
//
// To see all of Zed's default settings without changing your
// custom settings, run `zed: open default settings` from the
// command palette
{
  "assistant": {
    "default_model": {
      "provider": "ollama",
      "model": "stablelm2:latest"
    },
    "version": "2"
  },
  "telemetry": {
    "diagnostics": false,
    "metrics": false
  },
  "base_keymap": "VSCode",
  "ui_font_size": 16,
  "buffer_font_size": 16,
  "theme": {
    "mode": "system",
    "light": "One Light",
    "dark": "macOS Classic Dark"
  },
  "show_completions_on_input": true,
  "lsp": {
    "pyright": {
      "settings": {
        "python.analysis": {
          "diagnosticMode": "workspace",
          "typeCheckingMode": "standard"
        },
        "python": {
          "pythonPath": ".venv/bin/python"
        }
      }
    }
  },
  "languages": {
    "Python": {
      "format_on_save": "on",
      "formatter": [
        {
          "language_server": {
            "name": "ruff"
          }
        }
      ]
    }
  }
}

If applicable, add mockups / screenshots to help explain present your vision of the feature

No response

If applicable, attach your Zed.log file to this issue.

No response

mak448a avatar Aug 22 '24 02:08 mak448a