Skip to content

Commit 03012e3

Browse files
committed
Shuffle some pyproject.toml items.
1 parent 49f6aa8 commit 03012e3

File tree

2 files changed

+38
-29
lines changed

2 files changed

+38
-29
lines changed

pyproject.toml

Lines changed: 37 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ repository = "https://github.com/dreadnode/rigging"
88
readme = "README.md"
99
packages = [{ include = "rigging" }]
1010

11+
# Dependencies
12+
1113
[tool.poetry.dependencies]
1214
python = "^3.9"
1315
pydantic = "^2.7.3"
@@ -71,10 +73,14 @@ mkdocs-section-index = "^0.3.9"
7173
pymdown-extensions = "^10.8.1"
7274
pygments = "^2.18.0"
7375

76+
# Build
77+
7478
[build-system]
7579
requires = ["poetry-core"]
7680
build-backend = "poetry.core.masonry.api"
7781

82+
# Tests / Coverage
83+
7884
[tool.pytest.ini_options]
7985
filterwarnings = ["ignore::DeprecationWarning"]
8086

@@ -88,37 +94,23 @@ show_missing = true
8894
[tool.coverage.lcov]
8995
output = "lcov.info"
9096

97+
# Tracing
98+
9199
[tool.logfire]
92100
ignore_no_config = true
93101

102+
# Type Checking
103+
94104
[tool.mypy]
95105
plugins = "pydantic.mypy"
96106
strict = true
97107

98-
[tool.ruff]
99-
select = [
100-
"E", # pycodestyle errors
101-
"W", # pycodestyle warnings
102-
"F", # pyflakes
103-
"I", # isort
104-
"C", # flake8-comprehensions
105-
"B", # flake8-bugbear
106-
"UP", # pyupgrade
107-
"NPY", # numpydoc
108-
"TCH", # typecheck
109-
"A", # flake8-annotations
110-
]
111-
ignore = [
112-
"E501", # line too long, handled by black
113-
"B008", # do not perform function calls in argument defaults
114-
"C901", # too complex
115-
"W191", # indentation contains tabs
116-
"F722", # syntax error in forward annotation
117-
"UP007", # X | Y syntax while we're still supporting 3.9
118-
"UP038", # isinstance() X | Y instance ^
119-
"B905", # zip() without strict (isn't supported in 3.9)
120-
]
108+
# Formatting / Linting
121109

110+
[tool.ruff]
111+
line-length = 120
112+
indent-width = 4
113+
target-version = "py310"
122114
exclude = [
123115
".bzr",
124116
".direnv",
@@ -143,15 +135,32 @@ exclude = [
143135
"venv",
144136
]
145137

146-
line-length = 120
147-
indent-width = 4
148-
target-version = "py310"
149-
150138
[tool.ruff.lint]
151139
fixable = ["ALL"]
152140
unfixable = ["B"]
153-
154141
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
142+
select = [
143+
"E", # pycodestyle errors
144+
"W", # pycodestyle warnings
145+
"F", # pyflakes
146+
"I", # isort
147+
"C", # flake8-comprehensions
148+
"B", # flake8-bugbear
149+
"UP", # pyupgrade
150+
"NPY", # numpydoc
151+
"TCH", # typecheck
152+
"A", # flake8-annotations
153+
]
154+
ignore = [
155+
"E501", # line too long, handled by black
156+
"B008", # do not perform function calls in argument defaults
157+
"C901", # too complex
158+
"W191", # indentation contains tabs
159+
"F722", # syntax error in forward annotation
160+
"UP007", # X | Y syntax while we're still supporting 3.9
161+
"UP038", # isinstance() X | Y instance ^
162+
"B905", # zip() without strict (isn't supported in 3.9)
163+
]
155164

156165
[tool.ruff.format]
157166
quote-style = "double"

rigging/tool/native.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ def get_description(self) -> ToolDescription:
247247
if signature.return_annotation is inspect.Signature.empty:
248248
raise TypeError(f"Functions must have return type hints ({method_name})")
249249

250-
if signature.return_annotation != str:
250+
if signature.return_annotation is not str:
251251
raise TypeError(f"Functions must return strings ({method_name})")
252252

253253
parameters: list[ToolParameter] = []

0 commit comments

Comments
 (0)