forked from langchain-ai/langchain-mcp-adapters
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
119 lines (106 loc) 路 4.16 KB
/
Copy pathpyproject.toml
File metadata and controls
119 lines (106 loc) 路 4.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
[build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend"
[project]
name = "langchain-mcp-adapters"
version = "0.2.1"
description = "Make Anthropic Model Context Protocol (MCP) tools compatible with LangChain and LangGraph agents."
authors = [
{ name = "Vadym Barda", email = "19161700+vbarda@users.noreply.github.com" },
]
license = "MIT"
readme = "README.md"
requires-python = ">=3.10"
dependencies = [
"langchain-core>=1.0.0,<2.0.0",
"mcp>=1.9.2",
"typing-extensions>=4.14.0",
]
[dependency-groups]
integration = [
"langchain>=1.0.8",
]
test = [
"pytest>=8.0.0",
"ruff>=0.9.4",
"mypy>=1.8.0",
"pytest-socket>=0.7.0",
"pytest-asyncio>=0.26.0",
"types-setuptools>=69.0.0",
"websockets>=15.0.1",
"pytest-timeout>=2.4.0",
"dirty-equals>=0.9.0",
]
[project.urls]
repository = "https://www.github.com/langchain-ai/langchain-mcp-adapters"
[tool.pytest.ini_options]
minversion = "8.0"
# -ra: Report all extra test outcomes (passed, skipped, failed, etc.)
# -q: Enable quiet mode for less cluttered output
# -v: Enable verbose output to display detailed test names and statuses
# --durations=5: Show the 10 slowest tests after the run (useful for performance tuning)
addopts = "-ra -q -v --durations=5"
testpaths = ["tests"]
python_files = ["test_*.py"]
python_functions = ["test_*"]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
[tool.ruff]
line-length = 88
target-version = "py310"
[tool.ruff.lint]
select = [ "ALL",]
ignore = [
"COM812", # conflict with formatter
"C901", # Too complex
"PLR0913", # Too many arguments in function definition
"PLR0912", # Too many branches
"PLR0915", # Too many statements
"ERA001", # Commented out code should be removed
]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.mypy]
python_version = "3.11"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
check_untyped_defs = true
[tool.ruff.lint.extend-per-file-ignores]
"tests/**/*.py" = [
# at least this three should be fine in tests:
"S101", # asserts allowed in tests...
"ARG", # Unused function args -> fixtures nevertheless are functionally relevant...
"FBT", # Don't care about booleans as positional arguments in tests, e.g. via @pytest.mark.parametrize()
"D104",
# The below are debateable
"PLR2004", # Magic value used in comparison, ...
"S311", # Standard pseudo-random generators are not suitable for cryptographic purposes
"D100", # Missing docstring in public module
"D101", # Missing docstring in public class
"D102", # Missing docstring in public method
"D103", # Missing docstring in public function
"D104", # Missing docstring in public package
"D105", # Missing docstring in magic method
"D415", # First line should end with a period, question mark, or exclamation point
"EM101", # Exception must not use a string literal, assign to variable first
"EM102", # Exception must not use an f-string literal, assign to variable first
"TRY003", # Avoid specifying long messages outside the exception class
"TRY004", # Prefer `TypeError` exception for invalid type
"RET504", # Unnecessary assignment before return statement
"SIM117", # Use a single `with` statement instead of nested `with` statements
"TC002", # Move third-party imports into a type-checking block
"TC003", # Move standard library imports into a type-checking block
"ANN001", # Missing type annotation for function argument
"ANN201", # Missing return type annotation for public function
"ANN202", # Missing return type annotation for private function
"ANN401", # Dynamically typed expressions (typing.Any) are disallowed
"PT006", # Wrong type passed to first argument of `pytest.mark.parametrize`
"PT011", # pytest.raises is too broad, set the `match` parameter
"PTH118", # `os.path.join()` should be replaced by `Path` with `/` operator
"S110", # try-except-pass detected, consider logging the exception
"BLE001", # Do not catch blind exception: `Exception`
"SLF001", # Private member accessed
"PERF203", # `try-except` within a loop incurs performance overhead
"C901", # Function is too complex
]