Skip to content

Commit

Permalink
Merge pull request #52 from a5chin/feature/devcontainer
Browse files Browse the repository at this point in the history
Add Pylance in DevContainer
  • Loading branch information
a5chin authored Jan 25, 2025
2 parents 3ab9029 + d3630cd commit 5621e2e
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 6 deletions.
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.

1 comment on commit 5621e2e

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage

Coverage Report
FileStmtsMissCover
tests
   conftest.py50100%
tests/tools
   test__config.py90100%
   test__logger.py240100%
   test__trace.py70100%
tools
   __init__.py20100%
tools/config
   __init__.py30100%
   fastapi.py110100%
   settings.py200100%
tools/logger
   __init__.py50100%
   color.py120100%
   googlecloud.py100100%
   local.py120100%
   logger.py230100%
   style.py70100%
   type.py50100%
tools/trace
   __init__.py20100%
   timer.py160100%
TOTAL1730100%

Tests Skipped Failures Errors Time
8 0 💤 0 ❌ 0 🔥 1.363s ⏱️

Please sign in to comment.