Skip to content

Commit 2297447

Browse files
committed
Remove readme section from pyproject.toml. Typing and linting fixes.
1 parent 62fe644 commit 2297447

8 files changed

Lines changed: 26 additions & 23 deletions

File tree

dreadnode/artifact/merger.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -562,9 +562,9 @@ def _update_directory_hash(self, dir_node: DirectoryNode) -> str:
562562

563563
for child in dir_node["children"]:
564564
if child["type"] == "file":
565-
child_hashes.append(cast(FileNode, child)["hash"]) # noqa: TC006
565+
child_hashes.append(cast(FileNode, child)["hash"])
566566
else:
567-
child_hash = self._update_directory_hash(cast(DirectoryNode, child)) # noqa: TC006
567+
child_hash = self._update_directory_hash(cast(DirectoryNode, child))
568568
child_hashes.append(child_hash)
569569

570570
child_hashes.sort() # Ensure consistent hash regardless of order

dreadnode/artifact/tree_builder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ def _build_tree_structure(
262262
}
263263
dir_structure[root_dir_path] = root_node
264264

265-
for file_path in file_nodes_by_path: # noqa: PLC0206
265+
for file_path in file_nodes_by_path:
266266
try:
267267
rel_path = file_path.relative_to(base_dir)
268268
parts = rel_path.parts

dreadnode/main.py

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ def initialize(self) -> None:
217217

218218
try:
219219
self._api.list_projects()
220-
except Exception as e:
220+
except Exception as e: # noqa: BLE001
221221
raise RuntimeError(
222222
"Failed to authenticate with the provided server and token",
223223
) from e
@@ -371,36 +371,42 @@ class TaskDecorator(t.Protocol):
371371
def __call__(
372372
self,
373373
func: t.Callable[P, t.Awaitable[R]],
374-
) -> Task[P, R]: ...
374+
) -> Task[P, R]:
375+
...
375376

376377
@t.overload
377378
def __call__(
378379
self,
379380
func: t.Callable[P, R],
380-
) -> Task[P, R]: ...
381+
) -> Task[P, R]:
382+
...
381383

382384
def __call__(
383385
self,
384386
func: t.Callable[P, t.Awaitable[R]] | t.Callable[P, R],
385-
) -> Task[P, R]: ...
387+
) -> Task[P, R]:
388+
...
386389

387390
class ScoredTaskDecorator(t.Protocol, t.Generic[R]):
388391
@t.overload
389392
def __call__(
390393
self,
391394
func: t.Callable[P, t.Awaitable[R]],
392-
) -> Task[P, R]: ...
395+
) -> Task[P, R]:
396+
...
393397

394398
@t.overload
395399
def __call__(
396400
self,
397401
func: t.Callable[P, R],
398-
) -> Task[P, R]: ...
402+
) -> Task[P, R]:
403+
...
399404

400405
def __call__(
401406
self,
402407
func: t.Callable[P, t.Awaitable[R]] | t.Callable[P, R],
403-
) -> Task[P, R]: ...
408+
) -> Task[P, R]:
409+
...
404410

405411
@t.overload
406412
def task(
@@ -414,7 +420,8 @@ def task(
414420
log_output: bool = True,
415421
tags: t.Sequence[str] | None = None,
416422
**attributes: t.Any,
417-
) -> TaskDecorator: ...
423+
) -> TaskDecorator:
424+
...
418425

419426
@t.overload
420427
def task(
@@ -428,7 +435,8 @@ def task(
428435
log_output: bool = True,
429436
tags: t.Sequence[str] | None = None,
430437
**attributes: t.Any,
431-
) -> ScoredTaskDecorator[R]: ...
438+
) -> ScoredTaskDecorator[R]:
439+
...
432440

433441
def task(
434442
self,
@@ -824,13 +832,14 @@ def log_metric(
824832
- direct: do not modify the value at all (default)
825833
- min: always report the lowest ovbserved value for this metric
826834
- max: always report the highest observed value for this metric
835+
- avg: report the average of all values for this metric
827836
- sum: report a rolling sum of all values for this metric
828837
- count: report the number of times this metric has been logged
829838
to: The target object to log the metric to. Can be "task-or-run" or "run".
830839
Defaults to "task-or-run". If "task-or-run", the metric will be logged
831840
to the current task or run, whichever is the nearest ancestor.
832841
"""
833-
... # noqa: PIE790
842+
...
834843

835844
@handle_internal_errors()
836845
def log_metric(

dreadnode/metric.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ class Scorer(t.Generic[T]):
125125
def from_callable(
126126
cls,
127127
tracer: Tracer,
128-
func: ScorerCallable[T] | "Scorer[T]", # noqa: TC010
128+
func: ScorerCallable[T] | "Scorer[T]",
129129
*,
130130
name: str | None = None,
131131
tags: t.Sequence[str] | None = None,

dreadnode/serialization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def _handle_sequence(
7676
non_empty_schemas_found = True
7777

7878
schema: JsonDict = {"type": "array"}
79-
if obj_type != list: # noqa: E721
79+
if obj_type != list:
8080
schema["title"] = obj_type.__name__
8181
type_name_map = {tuple: "tuple", set: "set", frozenset: "set", deque: "deque"}
8282
schema["x-python-datatype"] = type_name_map.get(obj_type, obj_type.__name__)

dreadnode/tracing/span.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def __exit__(
135135
if self._token is None or self._span is None:
136136
return
137137

138-
context_api.detach(self._token)
138+
context_api.detach(self._token) # type: ignore [arg-type]
139139
self._token = None
140140

141141
if not self._span.is_recording():

dreadnode/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def log_internal_error() -> None:
5454
reraise = False
5555

5656
if reraise:
57-
raise # noqa: PLE0704
57+
raise
5858

5959
with suppress_instrumentation(): # prevent infinite recursion from the logging integration
6060
logger.exception(

pyproject.toml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,6 @@ pyarrow = "^19.0.1"
7575
asyncio_mode = "auto"
7676
asyncio_default_fixture_loop_scope = "function"
7777

78-
[tool.readme]
79-
github_org = "dreadnode"
80-
logo_url = "https://d1lppblt9t2x15.cloudfront.net/logos/5714928f3cdc09503751580cffbe8d02.png"
81-
tagline = "with batteries included 🔋"
82-
emoji = "🐍"
83-
8478
[tool.ruff]
8579
target-version = "py310"
8680
line-length = 100

0 commit comments

Comments
 (0)