Skip to content

Commit 396030c

Browse files
[pre-commit.ci] pre-commit autoupdate (#622)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Tobias Raabe <[email protected]>
1 parent 0f2b34a commit 396030c

File tree

4 files changed

+7
-9
lines changed

4 files changed

+7
-9
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ repos:
2929
hooks:
3030
- id: sort-all
3131
- repo: https://github.com/astral-sh/ruff-pre-commit
32-
rev: v0.4.9
32+
rev: v0.5.1
3333
hooks:
3434
- id: ruff-format
3535
- id: ruff

docs_src/how_to_guides/provisional_products.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
def get_files_without_file_extensions_from_repo() -> list[str]:
1010
url = "https://api.github.com/repos/pytask-dev/pytask/git/trees/main"
11-
response = httpx.get(url)
11+
response = httpx.get(url, timeout=10)
1212
elements = response.json()["tree"]
1313
return [
1414
e["path"]

src/_pytask/collect.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -247,11 +247,10 @@ def _is_filtered_object(obj: Any) -> bool:
247247
# Filter objects overwriting the ``__getattr__`` method like :class:`pytask.mark` or
248248
# ``from ibis import _``.
249249
attr_name = "attr_that_definitely_does_not_exist"
250-
if hasattr(obj, attr_name) and not bool(
251-
inspect.getattr_static(obj, attr_name, False)
252-
):
253-
return True
254-
return False
250+
return bool(
251+
hasattr(obj, attr_name)
252+
and not bool(inspect.getattr_static(obj, attr_name, False))
253+
)
255254

256255

257256
@hookimpl

src/_pytask/task_utils.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,7 @@ def parse_collected_tasks_with_task_marker(
230230
if name in duplicated_names:
231231
selected_tasks = [i for i in parsed_tasks if i[0] == name]
232232
names_to_functions = _generate_ids_for_tasks(selected_tasks)
233-
for unique_name, task in names_to_functions.items():
234-
collected_tasks[unique_name] = task
233+
collected_tasks.update(names_to_functions)
235234
else:
236235
collected_tasks[name] = next(i[1] for i in parsed_tasks if i[0] == name)
237236

0 commit comments

Comments
 (0)