Skip to content
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
4 changes: 2 additions & 2 deletions obstore/python/obstore/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import TYPE_CHECKING

from . import _obstore, store
from ._obstore import * # noqa: F403
from . import _obstore, store # pyright:ignore[reportMissingModuleSource]
from ._obstore import * # noqa: F403 # pyright:ignore[reportMissingModuleSource]

if TYPE_CHECKING:
from . import exceptions # noqa: TC004
Expand Down
11 changes: 8 additions & 3 deletions obstore/python/obstore/store.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
from typing import TYPE_CHECKING, Union, overload

import obstore as obs
from obstore._obstore import _store
from obstore._obstore import parse_scheme as _parse_scheme
from obstore._obstore import _store # pyright:ignore[reportMissingModuleSource]
from obstore._obstore import ( # pyright:ignore[reportMissingModuleSource]
parse_scheme as _parse_scheme,
)
from obstore.exceptions import BaseError

if TYPE_CHECKING:
Expand All @@ -32,7 +34,10 @@
PutMode,
PutResult,
)
from obstore._obstore import Bytes, GetResult
from obstore._obstore import ( # pyright:ignore[reportMissingModuleSource]
Bytes,
GetResult,
)
from obstore._store import (
AzureAccessKey, # noqa: TC004
AzureBearerToken, # noqa: TC004
Expand Down
10 changes: 9 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,15 @@ ignore = [
]

[tool.pyright]
exclude = ["examples/**"]
exclude = [
"**/__pycache__",
"examples",
".venv",
]
executionEnvironments = [
{ root = "./", extraPaths = ["./obstore/python"] }, # Tests.
{ root = "./obstore/python" }
]

[tool.pytest.ini_options]
addopts = "-v --mypy-only-local-stub"
Expand Down
3 changes: 2 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ def moto_server_uri():
else:
s = server._server
assert s is not None
host, port = s.server_address
# An AF_INET6 socket address has 4 components.
host, port = s.server_address[:2]
uri = f"http://{host}:{port}"
yield uri
server.stop()
Expand Down
Loading