Skip to content

Commit 3fb12db

Browse files
committed
Release 1.1.1
1 parent ce59db2 commit 3fb12db

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
author = "Nathan Rockenbach"
2424

2525
# The full version, including alpha/beta/rc tags
26-
release = "1.1.1post2"
26+
release = "1.1.1post3"
2727

2828

2929
# -- General configuration ---------------------------------------------------

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def generate_datafiles() -> List[Tuple[str, List[str]]]:
4848

4949
setuptools.setup(
5050
name="AutoTransform",
51-
version="1.1.1post2",
51+
version="1.1.1post3",
5252
author="Nathan Rockenbach",
5353
author_email="[email protected]",
5454
description="A component based framework for designing automated code modification",

src/python/autotransform/batcher/codeowners.py

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ def batch(self, items: Sequence[Item]) -> List[Batch]:
5757
individual_owners: Dict[str, List[Item]] = {}
5858
no_owners: List[Item] = []
5959

60-
with open(self.codeowners_location, mode="r", encoding="UTF-8") as codeowners_file:
60+
with open(
61+
self.codeowners_location, mode="r", encoding="UTF-8"
62+
) as codeowners_file:
6163
codeowners = CodeOwners(codeowners_file.read())
6264

6365
# Build Owner Dictionaries
@@ -83,7 +85,8 @@ def batch(self, items: Sequence[Item]) -> List[Batch]:
8385
# Add batches based on individual owners
8486
batches.extend(self._create_batches(individual_owners, "reviewers"))
8587
# Add unowned batch
86-
batches.extend(self._create_batches({"unowned": no_owners}))
88+
if no_owners:
89+
batches.extend(self._create_batches({"unowned": no_owners}))
8790

8891
return batches
8992

@@ -92,9 +95,15 @@ def _create_batches(
9295
) -> List[Batch]:
9396
batches = []
9497
for owner, items in owners.items():
95-
num_chunks = math.ceil(len(items) / self.max_batch_size) if self.max_batch_size else 1
98+
num_chunks = (
99+
math.ceil(len(items) / self.max_batch_size)
100+
if self.max_batch_size
101+
else 1
102+
)
96103
chunk_size = math.ceil(len(items) / num_chunks)
97-
item_chunks = [items[i : i + chunk_size] for i in range(0, len(items), chunk_size)]
104+
item_chunks = [
105+
items[i : i + chunk_size] for i in range(0, len(items), chunk_size)
106+
]
98107
for i, chunk_items in enumerate(item_chunks, start=1):
99108
title = (
100109
f"[{i}/{num_chunks}]{self.prefix} {owner}"

0 commit comments

Comments
 (0)