Skip to content

Commit 5e64c2e

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent a7940cd commit 5e64c2e

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ install_requires =
4040
pybaum>=0.1.1
4141
rich
4242
tomli>=1.0.0
43-
python_requires = >=3.7
43+
python_requires = >=3.8
4444
include_package_data = True
4545
package_dir =
4646
=src

src/_pytask/collect_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,8 @@ def _merge_dictionaries(list_of_dicts: list[dict[Any, Any]]) -> dict[Any, Any]:
175175
"""
176176
merged_dict = _union_of_dictionaries(list_of_dicts)
177177

178-
if len(merged_dict) == 1 and isinstance(list(merged_dict)[0], _Placeholder):
179-
placeholder, value = list(merged_dict.items())[0]
178+
if len(merged_dict) == 1 and isinstance(next(iter(merged_dict)), _Placeholder):
179+
placeholder, value = next(iter(merged_dict.items()))
180180
out = value if placeholder.scalar else {0: value}
181181
else:
182182
counter = itertools.count()

src/_pytask/console.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ def create_url_style_for_path(path: Path, edtior_url_scheme: str) -> Style:
210210
)
211211

212212

213-
def _get_file(function: Callable[..., Any], skipped_paths: list[Path] = None) -> Path:
213+
def _get_file(function: Callable[..., Any], skipped_paths: list[Path] | None = None) -> Path:
214214
"""Get path to module where the function is defined.
215215
216216
When the ``pdb`` or ``trace`` mode is activated, every task function is wrapped with

src/_pytask/task_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def parse_collected_tasks_with_task_marker(
102102
for unique_name, task in names_to_functions.items():
103103
collected_tasks[unique_name] = task
104104
else:
105-
collected_tasks[name] = [i[1] for i in parsed_tasks if i[0] == name][0]
105+
collected_tasks[name] = next(i[1] for i in parsed_tasks if i[0] == name)
106106

107107
return collected_tasks
108108

0 commit comments

Comments
 (0)