-
Notifications
You must be signed in to change notification settings - Fork 110
Expand file tree
/
Copy pathpyproject.toml
More file actions
143 lines (127 loc) · 3.16 KB
/
pyproject.toml
File metadata and controls
143 lines (127 loc) · 3.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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
[build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "stagehand"
version = "0.0.1"
description = "Python SDK for Stagehand"
readme = "README.md"
license = {text = "MIT"}
authors = [
{name = "Browserbase, Inc.", email = "support@browserbase.com"}
]
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
]
requires-python = ">=3.9"
dependencies = [
"httpx>=0.24.0",
"python-dotenv>=1.0.0",
"pydantic>=1.10.0",
"playwright>=1.42.1",
"requests>=2.31.0",
"browserbase>=1.4.0",
"rich>=14.0.0",
"openai>=1.83.0",
"anthropic>=0.51.0",
"litellm>=1.72.0",
]
[project.optional-dependencies]
dev = [
"pytest>=7.3.1",
"pytest-asyncio>=0.21.0",
"pytest-mock>=3.10.0",
"pytest-cov>=4.1.0",
"black>=23.3.0",
"isort>=5.12.0",
"mypy>=1.3.0",
"ruff",
]
[project.urls]
Homepage = "https://github.com/browserbase/stagehand-python"
Repository = "https://github.com/browserbase/stagehand-python"
[tool.setuptools]
# Omit explicit package list so we can use the nested `.packages.find` table below.
[tool.setuptools.packages.find]
where = ["."]
include = ["stagehand*"]
[tool.setuptools.package-data]
stagehand = ["domScripts.js"]
[tool.ruff]
# Same as Black
line-length = 88
# Target Python version
target-version = "py39" # Adjust to your version
# Exclude a variety of commonly ignored directories
exclude = [
".git",
".ruff_cache",
"__pycache__",
"venv",
".venv",
"dist",
"tests"
]
# Define lint-specific settings here
[tool.ruff.lint]
select = ["E", "F", "B", "C4", "UP", "N", "I", "C"]
# Ignore line length errors - let Black handle those
ignore = ["E501", "C901"]
# Allow autofix for all enabled rules (when `--fix` is provided)
fixable = ["ALL"]
unfixable = []
# Allow unused variables when underscore-prefixed
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
line-ending = "auto"
# Naming conventions are part of the N rules
[tool.ruff.lint.pep8-naming]
# Allow underscores in class names (e.g. Test_Case)
classmethod-decorators = ["classmethod", "validator"]
# Per-file ignores
[tool.ruff.lint.per-file-ignores]
# Ignore imported but unused in __init__.py files
"__init__.py" = ["F401"]
# Ignore unused imports in tests
"tests/*" = ["F401", "F811"]
# Add more customizations if needed
[tool.ruff.lint.pydocstyle]
convention = "google"
# Black configuration
[tool.black]
line-length = 88
target-version = ["py39"]
include = '\.pyi?$'
exclude = '''
/(
\.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| _build
| buck-out
| build
| dist
| __pycache__
| python-sdk
)/
'''
# Ensure Black will wrap long strings and docstrings
skip-string-normalization = false
preview = true
# isort configuration to work with Black
[tool.isort]
profile = "black"
line_length = 88
multi_line_output = 3
include_trailing_comma = true
force_grid_wrap = 0
use_parentheses = true
ensure_newline_before_comments = true
skip_gitignore = true
skip_glob = ["**/venv/**", "**/.venv/**", "**/__pycache__/**"]