FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix: Enable mypy in the CI by Tranquility2 · Pull Request #842 · testcontainers/testcontainers-python · GitHub

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (1) .yml  (1) No extension  (1) All 3 file types selected
Only manifest files
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
5 changes: 5 additions & 0 deletions .github/workflows/ci-lint.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,14 @@ jobs:
- name: Install Python dependencies
run: poetry install --no-interaction
- name: Execute pre-commit handler
continue-on-error: true
run: |
poetry run pre-commit run check-toml
poetry run pre-commit run trailing-whitespace
poetry run pre-commit run end-of-file-fixer
poetry run pre-commit run ruff
poetry run pre-commit run ruff-format
- name: Execute mypy
run: |
make mypy-core-report
make mypy-core
5 changes: 4 additions & 1 deletion Makefile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ coverage: ## Target to combine and report coverage.
lint: ## Lint all files in the project, which we also run in pre-commit
poetry run pre-commit run -a

mypy-core-report:
mypy-core: ## Run mypy on the core package
poetry run mypy --config-file pyproject.toml core

mypy-core-report: ## Generate a report for mypy on the core package
poetry run mypy --config-file pyproject.toml core | poetry run python scripts/mypy_report.py

docs: ## Build the docs for the project
Expand Down
3 changes: 1 addition & 2 deletions core/testcontainers/core/config.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from os import environ
from os.path import exists
from pathlib import Path
from typing import Final, Optional, Union, cast
from typing import Final, Optional, Union

import docker

Expand Down Expand Up @@ -39,7 +39,6 @@ def get_docker_socket() -> str:
try:
client = docker.from_env()
socket_path = client.api.get_adapter(client.api.base_url).socket_path
socket_path = cast("str", socket_path)
# return the normalized path as string
return str(Path(socket_path).absolute())
except Exception:
Expand Down

Back | FazBrowse Home | New Git URL