Skip to content

Commit

Permalink
ci: fix type failures
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleKing committed Dec 10, 2023
1 parent 31f2c6e commit 86236bf
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
17 changes: 10 additions & 7 deletions calcipy/tasks/all_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,20 +63,23 @@ def with_progress(items: Any, offset: int = 0) -> TaskList:
"""
task_items = [_build_task(_t) for _t in items]
message = 'Running tasks: ' + ', '.join([str(_t.__name__) for _t in task_items])
tasks: TaskList = [summary.with_kwargs(message=message)]
tasks: TaskList = [summary.with_kwargs(message=message)] # pyright: ignore[reportFunctionMemberAccess]

total = len(task_items) + offset
for idx, item in enumerate(task_items):
tasks += [progress.with_kwargs(index=idx + offset, total=total), item]
tasks += [
progress.with_kwargs(index=idx + offset, total=total), # pyright: ignore[reportFunctionMemberAccess]
item,
]
return tasks


_MAIN_TASKS = [
lint.fix,
types.mypy,
types.pyright,
nox.noxfile.with_kwargs(session='tests'), # pyright: ignore[reportGeneralTypeIssues]
lint.pre_commit.with_kwargs(no_update=True), # pyright: ignore[reportGeneralTypeIssues]
nox.noxfile.with_kwargs(session='tests'), # pyright: ignore[reportFunctionMemberAccess]
lint.pre_commit.with_kwargs(no_update=True), # pyright: ignore[reportFunctionMemberAccess]
lint.security,
tags.collect_code_tags,
cl.write,
Expand All @@ -99,15 +102,15 @@ def main(_ctx: Context) -> None:
"""Main task pipeline."""


@task(post=with_progress(_OTHER_TASKS)) # pyright: ignore[reportGeneralTypeIssues]
@task(post=with_progress(_OTHER_TASKS))
def other(_ctx: Context) -> None:
"""Run tasks that are otherwise not exercised in main."""


@task(
help=cl.bump.help,
help=cl.bump.help, # pyright: ignore[reportFunctionMemberAccess]
post=with_progress(
[ # pyright: ignore[reportGeneralTypeIssues]
[
pack.lock,
doc.build,
doc.deploy,
Expand Down
4 changes: 4 additions & 0 deletions docs/docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## Unreleased

### Fix

- create the code tag summary directory if it doesn't already exist

## 2.0.3 (2023-11-21)

### Fix
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/DEVELOPER_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ poetry config pypi-token.pypi ...
| `calcipy/check_for_stale_packages/_check_for_stale_packages.py` | 117 | 8 | 3 | 87.2% |
| `calcipy/cli.py` | 37 | 1 | 36 | 93.3% |
| `calcipy/code_tag_collector/__init__.py` | 4 | 2 | 0 | 50.0% |
| `calcipy/code_tag_collector/_collector.py` | 142 | 2 | 0 | 94.0% |
| `calcipy/code_tag_collector/_collector.py` | 143 | 2 | 0 | 94.0% |
| `calcipy/dot_dict/__init__.py` | 4 | 2 | 0 | 50.0% |
| `calcipy/dot_dict/_dot_dict.py` | 8 | 0 | 0 | 100.0% |
| `calcipy/experiments/__init__.py` | 0 | 0 | 0 | 100.0% |
Expand All @@ -80,7 +80,7 @@ poetry config pypi-token.pypi ...
| `calcipy/tasks/tags.py` | 15 | 0 | 0 | 100.0% |
| `calcipy/tasks/test.py` | 45 | 1 | 2 | 89.2% |
| `calcipy/tasks/types.py` | 17 | 0 | 0 | 91.3% |
| **Totals** | 1034 | 66 | 182 | 87.3% |
| **Totals** | 1035 | 66 | 182 | 87.3% |

Generated on: 2023-12-10
<!-- {cte} -->

0 comments on commit 86236bf

Please sign in to comment.