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
3 changes: 3 additions & 0 deletions examples/agentscope/example.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/usr/bin/env python
"""AgentScope ReAct agent traced via braintrust.auto_instrument()."""
# This example documents the pre-2.0 AgentScope API, which is no longer exposed
# by the matrix's 2.x SDK to static analysis.
# pylint: disable=import-error,no-name-in-module,unexpected-keyword-arg,no-value-for-parameter

import asyncio

Expand Down
4 changes: 3 additions & 1 deletion examples/anthropic/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ def ask_anthropic_sync(question, system=None):
}
if system:
args["system"] = system
msg = client.messages.create(**args)
# Temperature remains accepted by the API although the latest SDK typing
# omits it from the parameter signature.
msg = client.messages.create(**args) # pylint: disable=unexpected-keyword-arg
print(msg)


Expand Down
25 changes: 22 additions & 3 deletions py/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -873,10 +873,29 @@ def test_types(session):

@nox.session()
def pylint(session):
# pylint needs everything so we don't trigger missing import errors
session.install(".[all]")
# Base test deps + lint tools + all vendor packages, all from the lockfile.
# Install the project without optional extras, then install stable lint and
# test dependencies from the lockfile. Optional vendor packages follow the
# matrix's latest pins so lint sees the same SDK versions as CI tests.
session.install(".")
_install_group_locked(session, "test", "lint")
minimum_python = {
"ai-sdk": (3, 12),
"agentscope": (3, 11),
"harbor": (3, 12),
"pipecat-ai": (3, 11),
}
for package in _VENDOR_TABLE:
# These providers do not support the Python versions in the static
# checks matrix. Keep lint installs compatible with the active Python.
if sys.version_info[:2] < minimum_python.get(package, (3, 10)):
continue
Comment thread
AbhiPrasad marked this conversation as resolved.
if package == "pipecat-ai" and sys.version_info >= (3, 14):
continue
# CrewAI's latest release brings unsuitable chromadb transitive deps;
# its integration tests install it in their isolated session instead.
if package == "crewai":
continue
_install_matrix_dep(session, package, LATEST)
Comment thread
AbhiPrasad marked this conversation as resolved.
Comment thread
AbhiPrasad marked this conversation as resolved.

result = session.run("git", "ls-files", "**/*.py", silent=True, log=False)
files = [path for path in result.strip().splitlines() if not path.startswith(GENERATED_LINT_EXCLUDES)]
Expand Down
53 changes: 17 additions & 36 deletions py/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -251,43 +251,18 @@ test-types = [
lint = [
"pylint==4.0.5",
"pyperf==2.10.0",
# Packages below are needed so pylint can resolve every SDK import.
# Versions are unpinned (unless already constrained) so the resolver
# can find mutually compatible transitive deps.
"agentscope<2",
"agno",
"ai>=0.4.0; python_version>='3.12'",
"anthropic",
"autogen-agentchat",
"autogen-ext[openai]",
"claude-agent-sdk",
"cohere",
"autoevals",
"braintrust-core",
# Do not install crewai in the shared lint environment: current releases
# transitively pin vulnerable chromadb versions. CrewAI integration tests
# install the provider package via the nox matrix instead.
# onnxruntime 1.24.3 dropped cp310 wheels. Constrain the transitive
# resolution on Python 3.10 so pylint can still build its environment.
"onnxruntime<1.24; python_version<'3.11'",
"dspy",
"google-adk",
"google-genai",
"google-cloud-discoveryengine",
"instructor",
"litellm>=1.83.10",
"livekit-agents",
# Non-vendor packages needed by pylint imports and the project's `all` extra.
# Vendor SDK versions are installed from [tool.braintrust.matrix] below.
"python-dotenv",
"starlette",
"uv",
"uvicorn",
"orjson; platform_python_implementation != 'PyPy'",
# Imported directly by LiveKit integration tests, but not a standalone
# version-matrix package.
"livekit-plugins-openai",
"mistralai",
"openai",
"openai-agents",
"openrouter",
"huggingface-hub",
"numpy",
"strands-agents",
"typesafe-sdk",
"temporalio",
"pydantic-ai",
# Keep these available to pylint without installing CrewAI (whose
# transitive chromadb versions are unsuitable for shared CI).
"opentelemetry-instrumentation-openai==0.59.1",
"langsmith==0.8.18",
"langchain-core",
Expand Down Expand Up @@ -624,6 +599,7 @@ typesafe = ["typesafe-sdk"]

[tool.braintrust.vendor-packages]
ai-sdk = "ai"
claude-agent-sdk = "claude_agent_sdk"
agno = "agno"
agentscope = "agentscope"
autogen-agentchat = "autogen_agentchat"
Expand All @@ -641,14 +617,19 @@ dspy = "dspy"
google-adk = "google.adk"
google-genai = "google.genai"
google-cloud-discoveryengine = "google.cloud.discoveryengine_v1"
instructor = "instructor"
litellm = "litellm"
livekit-agents = "livekit.agents"
mistralai = "mistralai"
huggingface-hub = "huggingface_hub"
openai = "openai"
openai-agents = "agents"
openrouter = "openrouter"
opentelemetry-api = "opentelemetry"
opentelemetry-sdk = "opentelemetry.sdk"
opentelemetry-exporter-otlp-proto-http = "opentelemetry.exporter.otlp.proto.http"
pipecat-ai = "pipecat"
pydantic-ai-integration = "pydantic_ai"
strands-agents = "strands"
temporalio = "temporalio"
transformers = "transformers"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""Test auto_instrument for AgentScope."""
# pylint: disable=import-error,no-name-in-module,no-value-for-parameter,no-member
# pylint: disable=import-error,no-name-in-module,no-value-for-parameter,no-member,unexpected-keyword-arg

import asyncio
import importlib
Expand Down
Loading
Loading