Skip to content

Add Pylance in DevContainer #52

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jan 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"mosapride.zenkaku",
"ms-azuretools.vscode-docker",
"ms-python.python",
"ms-python.vscode-pylance",
"njpwerner.autodocstring",
"redhat.vscode-yaml",
"shardulm94.trailing-spaces",
Expand Down
1 change: 1 addition & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"mosapride.zenkaku",
"ms-azuretools.vscode-docker",
"ms-python.python",
"ms-python.vscode-pylance",
"ms-vscode-remote.remote-containers",
"njpwerner.autodocstring",
"oderwat.indent-rainbow",
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ uv add {libraries}
│ │ └── type.py
│ ├── trace/
│ │ ├── __init__.py
│ │ └── time.py
│ │ └── timer.py
│ └── __init__.py
├── .dockerignore
├── .env.local
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/tools/logger.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
```python
from tools.logger import Logger
from tools import Logger


def main() -> None:
Expand Down
5 changes: 3 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Welcome to python-uv

## What is python-uv?
This repository contains configurations to set up a Python development environment using VSCode's Dev Container feature. The environment includes uv and Ruff.
This repository contains configurations to set up a Python development environment using VSCode's Dev Container feature.
The environment includes uv and Ruff.

<img align="center" src="img/ruff.gif">

Expand Down Expand Up @@ -45,7 +46,7 @@ This repository contains configurations to set up a Python development environme
│ │ └── type.py
│ ├── trace/
│ │ ├── __init__.py
│ │ └── time.py
│ │ └── timer.py
│ └── __init__.py
├── .dockerignore
├── .env.local
Expand Down
7 changes: 7 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,10 @@ dev-dependencies = [
"pytest-cov>=6.0.0",
"ruff>=0.9.2",
]

[tool.hatch.build.targets.wheel]
packages = ["tools"]

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
6 changes: 6 additions & 0 deletions tools/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
"""Tools."""

from tools.logger import Logger

__all__ = [
"Logger",
]
2 changes: 1 addition & 1 deletion tools/trace/timer.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def __exit__(self, *exc: object) -> None:
"""Run when exit ContextManager or Decoraotr."""
self.end = time.time()

from tools.logger import Logger
from tools import Logger

logger = Logger(self.name)
logger.debug("executed in %f ms", self._duration * 1_000)
Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading