Skip to content
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

chore(weave): pyright: enable reportRedeclaration #2879

Merged
merged 14 commits into from
Nov 5, 2024
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: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,6 @@ reportPossiblyUnboundVariable = false
reportOptionalMemberAccess = false
reportArgumentType = false
reportCallIssue = false
reportRedeclaration = false

[tool.mypy]
warn_unused_configs = true
Expand Down
2 changes: 1 addition & 1 deletion weave/integrations/langchain/langchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def _run_to_dict(run: Run, as_input: bool = False) -> dict:
run_dict = {k: v for k, v in run_dict.items() if v}
return run_dict

class WeaveTracer(BaseTracer):
class WeaveTracer(BaseTracer): # pyright: ignore[reportRedeclaration]
run_inline: bool = True

def __init__(self, **kwargs: Any) -> None:
Expand Down
2 changes: 1 addition & 1 deletion weave/integrations/llamaindex/llamaindex.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

if not import_failed:

class WeaveCallbackHandler(BaseCallbackHandler):
class WeaveCallbackHandler(BaseCallbackHandler): # pyright: ignore[reportRedeclaration]
"""Base callback handler that can be used to track event starts and ends."""

def __init__(
Expand Down
2 changes: 1 addition & 1 deletion weave/trace/op.py
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ def create_wrapper(func: Callable) -> Op:
if is_async:

@wraps(func)
async def wrapper(*args: Any, **kwargs: Any) -> Any:
async def wrapper(*args: Any, **kwargs: Any) -> Any: # pyright: ignore[reportRedeclaration]
res, _ = await _do_call_async(
cast(Op, wrapper), *args, __should_raise=True, **kwargs
)
Expand Down
Loading