Skip to content

Commit

Permalink
pre-commit run --all-files
Browse files Browse the repository at this point in the history
  • Loading branch information
rkingsbury committed Jun 20, 2024
1 parent b2bc355 commit c450ad5
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/getting_started/simple_builder.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ One advantage of using the generator approach is it is less memory intensive tha

`process_item` just has to do the parallelizable work on each item. Since the item is whatever comes out of `get_items`, you know exactly what it should be. It may be a single document, a list of documents, a mapping, a set, etc.

Our simple process item just has to multiply one field by `self.mulitplier`:
Our simple process item just has to multiply one field by `self.multiplier`:

``` python

Expand Down
1 change: 1 addition & 0 deletions src/maggma/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Primary Maggma module."""

from importlib.metadata import PackageNotFoundError, version

try:
Expand Down
5 changes: 3 additions & 2 deletions src/maggma/cli/multiprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,9 @@ async def get_from_iterator(self):
future = loop.run_in_executor(self.executor, safe_dispatch, (self.func, item))

self.tasks[idx] = future

loop.create_task(self.process_and_release(idx))
# TODO - line below raises RUF006 error. Unsure about the best way to
# resolve. See https://docs.astral.sh/ruff/rules/asyncio-dangling-task/
loop.create_task(self.process_and_release(idx)) # noqa: RUF006

await gather(*self.tasks.values())
self.results.put_nowait(self.done_sentinel)
Expand Down
1 change: 1 addition & 0 deletions tests/builders/test_copy_builder.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Tests for MapBuilder
"""

from datetime import datetime, timedelta

import pytest
Expand Down
1 change: 1 addition & 0 deletions tests/builders/test_group_builder.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Tests for group builder
"""

from datetime import datetime
from random import randint

Expand Down
1 change: 1 addition & 0 deletions tests/stores/test_advanced_stores.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Tests for advanced stores
"""

import os
import shutil
import signal
Expand Down
1 change: 1 addition & 0 deletions tests/test_utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Tests for builders
"""

from datetime import datetime
from time import sleep

Expand Down
1 change: 1 addition & 0 deletions tests/test_validator.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Tests the validators
"""

import pytest
from monty.json import MSONable

Expand Down

0 comments on commit c450ad5

Please sign in to comment.