Skip to content

Commit

Permalink
ci: fix mypy failures
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleKing committed Jun 7, 2024
1 parent 3a3cc82 commit 20c977c
Show file tree
Hide file tree
Showing 10 changed files with 263 additions and 309 deletions.
160 changes: 68 additions & 92 deletions .calcipy_packaging.lock
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,6 @@
"name": "attrs",
"version": "23.2.0"
},
"autopep8": {
"datetime": "2024-05-28T15:05:13.571503+00:00",
"domain": "https://pypi.org/pypi/{name}/json",
"latest_datetime": "2024-05-28T15:05:13.571503+00:00",
"latest_version": "2.1.2",
"name": "autopep8",
"version": "2.1.2"
},
"babel": {
"datetime": "2024-05-05T13:54:41.446295+00:00",
"domain": "https://pypi.org/pypi/{name}/json",
Expand All @@ -64,12 +56,12 @@
"version": "2.15.0"
},
"basedpyright": {
"datetime": "2024-05-29T13:03:04.128263+00:00",
"datetime": "2024-06-05T08:43:22.168529+00:00",
"domain": "https://pypi.org/pypi/{name}/json",
"latest_datetime": "2024-05-29T13:03:04.128263+00:00",
"latest_version": "1.12.4",
"latest_datetime": "2024-06-05T08:43:22.168529+00:00",
"latest_version": "1.12.5",
"name": "basedpyright",
"version": "1.12.4"
"version": "1.12.5"
},
"beartype": {
"datetime": "2024-04-21T07:25:55.758384+00:00",
Expand Down Expand Up @@ -104,12 +96,12 @@
"version": "2.4"
},
"certifi": {
"datetime": "2024-02-02T01:22:14.860767+00:00",
"datetime": "2024-06-02T01:45:23.134166+00:00",
"domain": "https://pypi.org/pypi/{name}/json",
"latest_datetime": "2024-02-02T01:22:14.860767+00:00",
"latest_version": "2024.2.2",
"latest_datetime": "2024-06-02T01:45:23.134166+00:00",
"latest_version": "2024.6.2",
"name": "certifi",
"version": "2024.2.2"
"version": "2024.6.2"
},
"charset-normalizer": {
"datetime": "2023-11-01T04:02:29.048015+00:00",
Expand Down Expand Up @@ -272,12 +264,12 @@
"version": "0.27.0"
},
"hypothesis": {
"datetime": "2024-05-29T03:34:11.886616+00:00",
"datetime": "2024-06-05T21:23:27.551303+00:00",
"domain": "https://pypi.org/pypi/{name}/json",
"latest_datetime": "2024-05-29T03:34:11.886616+00:00",
"latest_version": "6.103.0",
"latest_datetime": "2024-06-05T21:23:27.551303+00:00",
"latest_version": "6.103.1",
"name": "hypothesis",
"version": "6.103.0"
"version": "6.103.1"
},
"idna": {
"datetime": "2024-04-11T03:34:41.447563+00:00",
Expand Down Expand Up @@ -416,20 +408,20 @@
"version": "0.2.0"
},
"mkdocs-git-revision-date-localized-plugin": {
"datetime": "2024-04-30T21:22:08.949878+00:00",
"datetime": "2024-05-31T19:07:27.792213+00:00",
"domain": "https://pypi.org/pypi/{name}/json",
"latest_datetime": "2024-04-30T21:22:08.949878+00:00",
"latest_version": "1.2.5",
"latest_datetime": "2024-05-31T19:07:27.792213+00:00",
"latest_version": "1.2.6",
"name": "mkdocs-git-revision-date-localized-plugin",
"version": "1.2.5"
"version": "1.2.6"
},
"mkdocs-include-markdown-plugin": {
"datetime": "2024-05-29T20:28:21.532693+00:00",
"datetime": "2024-06-01T21:17:08.477660+00:00",
"domain": "https://pypi.org/pypi/{name}/json",
"latest_datetime": "2024-05-29T20:28:21.532693+00:00",
"latest_version": "6.0.7",
"latest_datetime": "2024-06-01T21:17:08.477660+00:00",
"latest_version": "6.1.1",
"name": "mkdocs-include-markdown-plugin",
"version": "6.0.7"
"version": "6.1.1"
},
"mkdocs-literate-nav": {
"datetime": "2023-09-10T22:17:18.751200+00:00",
Expand All @@ -440,12 +432,12 @@
"version": "0.6.1"
},
"mkdocs-material": {
"datetime": "2024-05-27T09:38:40.174856+00:00",
"datetime": "2024-06-06T11:46:36.120839+00:00",
"domain": "https://pypi.org/pypi/{name}/json",
"latest_datetime": "2024-05-27T09:38:40.174856+00:00",
"latest_version": "9.5.25",
"latest_datetime": "2024-06-06T11:46:36.120839+00:00",
"latest_version": "9.5.26",
"name": "mkdocs-material",
"version": "9.5.25"
"version": "9.5.26"
},
"mkdocs-material-extensions": {
"datetime": "2023-11-22T19:09:43.465661+00:00",
Expand Down Expand Up @@ -559,6 +551,14 @@
"name": "pandas",
"version": "2.2.2"
},
"pandas-stubs": {
"datetime": "2024-06-03T18:02:19.076145+00:00",
"domain": "https://pypi.org/pypi/{name}/json",
"latest_datetime": "2024-06-03T18:02:19.076145+00:00",
"latest_version": "2.2.2.240603",
"name": "pandas-stubs",
"version": "2.2.2.240603"
},
"pathspec": {
"datetime": "2023-12-10T22:30:43.140207+00:00",
"domain": "https://pypi.org/pypi/{name}/json",
Expand All @@ -567,22 +567,6 @@
"name": "pathspec",
"version": "0.12.1"
},
"pip": {
"datetime": "2024-02-03T09:53:09.575683+00:00",
"domain": "https://pypi.org/pypi/{name}/json",
"latest_datetime": "2024-02-03T09:53:09.575683+00:00",
"latest_version": "24.0",
"name": "pip",
"version": "24.0"
},
"pip-check": {
"datetime": "2022-11-06T05:14:07.450137+00:00",
"domain": "https://pypi.org/pypi/{name}/json",
"latest_datetime": "2022-11-06T05:30:32.172747+00:00",
"latest_version": "2.9a1",
"name": "pip-check",
"version": "2.8.1"
},
"platformdirs": {
"datetime": "2024-05-15T03:18:21.209020+00:00",
"domain": "https://pypi.org/pypi/{name}/json",
Expand All @@ -607,29 +591,21 @@
"name": "prompt-toolkit",
"version": "3.0.36"
},
"pycodestyle": {
"datetime": "2023-10-12T23:39:38.242187+00:00",
"domain": "https://pypi.org/pypi/{name}/json",
"latest_datetime": "2023-10-12T23:39:38.242187+00:00",
"latest_version": "2.11.1",
"name": "pycodestyle",
"version": "2.11.1"
},
"pydantic": {
"datetime": "2024-05-28T18:38:44.607564+00:00",
"datetime": "2024-06-03T18:50:39.602084+00:00",
"domain": "https://pypi.org/pypi/{name}/json",
"latest_datetime": "2024-05-28T18:38:44.607564+00:00",
"latest_version": "2.7.2",
"latest_datetime": "2024-06-03T18:50:39.602084+00:00",
"latest_version": "2.7.3",
"name": "pydantic",
"version": "2.7.2"
"version": "2.7.3"
},
"pydantic-core": {
"datetime": "2024-05-28T17:29:13.919550+00:00",
"datetime": "2024-06-03T17:44:21.684324+00:00",
"domain": "https://pypi.org/pypi/{name}/json",
"latest_datetime": "2024-05-28T17:29:13.919550+00:00",
"latest_version": "2.18.3",
"latest_datetime": "2024-06-03T17:44:21.684324+00:00",
"latest_version": "2.18.4",
"name": "pydantic-core",
"version": "2.18.3"
"version": "2.18.4"
},
"pygments": {
"datetime": "2024-05-04T13:41:57.345734+00:00",
Expand All @@ -640,12 +616,12 @@
"version": "2.18.0"
},
"pylint": {
"datetime": "2024-05-20T07:22:40.191532+00:00",
"datetime": "2024-06-06T14:19:13.228004+00:00",
"domain": "https://pypi.org/pypi/{name}/json",
"latest_datetime": "2024-05-20T07:22:40.191532+00:00",
"latest_version": "3.2.2",
"latest_datetime": "2024-06-06T14:19:13.228004+00:00",
"latest_version": "3.2.3",
"name": "pylint",
"version": "3.2.2"
"version": "3.2.3"
},
"pymdown-extensions": {
"datetime": "2024-04-27T20:20:31.208741+00:00",
Expand All @@ -672,12 +648,12 @@
"version": "3.6.1"
},
"pytest": {
"datetime": "2024-05-19T19:07:58.066927+00:00",
"datetime": "2024-06-04T13:38:05.285139+00:00",
"domain": "https://pypi.org/pypi/{name}/json",
"latest_datetime": "2024-05-19T19:07:58.066927+00:00",
"latest_version": "8.2.1",
"latest_datetime": "2024-06-04T13:38:05.285139+00:00",
"latest_version": "8.2.2",
"name": "pytest",
"version": "8.2.1"
"version": "8.2.2"
},
"pytest-asyncio": {
"datetime": "2024-05-19T11:56:06.431353+00:00",
Expand Down Expand Up @@ -800,12 +776,12 @@
"version": "13.7.1"
},
"ruff": {
"datetime": "2024-05-28T19:21:16.331062+00:00",
"datetime": "2024-06-05T15:32:55.951755+00:00",
"domain": "https://pypi.org/pypi/{name}/json",
"latest_datetime": "2024-05-28T19:21:16.331062+00:00",
"latest_version": "0.4.6",
"latest_datetime": "2024-06-05T15:32:55.951755+00:00",
"latest_version": "0.4.8",
"name": "ruff",
"version": "0.4.6"
"version": "0.4.8"
},
"semver": {
"datetime": "2023-10-09T11:58:24.128452+00:00",
Expand Down Expand Up @@ -871,14 +847,6 @@
"name": "termcolor",
"version": "2.4.0"
},
"terminaltables": {
"datetime": "2021-12-07T19:03:34.013333+00:00",
"domain": "https://pypi.org/pypi/{name}/json",
"latest_datetime": "2021-12-07T19:03:34.013333+00:00",
"latest_version": "3.1.10",
"name": "terminaltables",
"version": "3.1.10"
},
"tomli": {
"datetime": "2022-02-08T10:54:02.017593+00:00",
"domain": "https://pypi.org/pypi/{name}/json",
Expand Down Expand Up @@ -911,6 +879,14 @@
"name": "types-python-dateutil",
"version": "2.9.0.20240316"
},
"types-pytz": {
"datetime": "2024-04-17T02:16:55.830875+00:00",
"domain": "https://pypi.org/pypi/{name}/json",
"latest_datetime": "2024-04-17T02:16:55.830875+00:00",
"latest_version": "2024.1.0.20240417",
"name": "types-pytz",
"version": "2024.1.0.20240417"
},
"types-pyyaml": {
"datetime": "2024-03-11T02:15:45.451944+00:00",
"domain": "https://pypi.org/pypi/{name}/json",
Expand All @@ -928,12 +904,12 @@
"version": "70.0.0.20240524"
},
"typing-extensions": {
"datetime": "2024-05-24T00:26:43.549001+00:00",
"datetime": "2024-06-01T17:28:56.718230+00:00",
"domain": "https://pypi.org/pypi/{name}/json",
"latest_datetime": "2024-05-24T00:26:43.549001+00:00",
"latest_version": "4.12.0",
"latest_datetime": "2024-06-01T17:28:56.718230+00:00",
"latest_version": "4.12.1",
"name": "typing-extensions",
"version": "4.12.0"
"version": "4.12.1"
},
"tzdata": {
"datetime": "2024-02-11T23:22:38.223335+00:00",
Expand Down Expand Up @@ -1008,11 +984,11 @@
"version": "1.9.4"
},
"zipp": {
"datetime": "2024-05-26T16:27:01.326062+00:00",
"datetime": "2024-06-04T17:21:07.146405+00:00",
"domain": "https://pypi.org/pypi/{name}/json",
"latest_datetime": "2024-05-26T16:27:01.326062+00:00",
"latest_version": "3.19.0",
"latest_datetime": "2024-06-04T17:21:07.146405+00:00",
"latest_version": "3.19.2",
"name": "zipp",
"version": "3.19.0"
"version": "3.19.2"
}
}
2 changes: 2 additions & 0 deletions calcipy/check_for_stale_packages/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
from ._check_for_stale_packages import check_for_stale_packages
except ImportError as exc:
raise RuntimeError("The 'calcipy[stale]' extras are missing") from exc

__all__ = ('check_for_stale_packages',)
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def _read_cache(path_pack_lock: Path = CALCIPY_CACHE) -> Dict[str, _HostedPython
"""
if not path_pack_lock.is_file():
path_pack_lock.write_text('{}', encoding='utf-8') # noqa: P103
path_pack_lock.write_text('{}', encoding='utf-8')
old_cache: Dict[str, Dict[str, str]] = json.loads(path_pack_lock.read_text(encoding='utf-8'))
return {
package_name: _HostedPythonPackage(**meta_data) # type: ignore[arg-type]
Expand Down
2 changes: 2 additions & 0 deletions calcipy/code_tag_collector/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
from ._collector import write_code_tag_file
except ImportError as exc:
raise RuntimeError("The 'calcipy[tags]' extras are missing") from exc

__all__ = ('write_code_tag_file',)
2 changes: 1 addition & 1 deletion calcipy/invoke_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@ def get_doc_subdir(path_project: Optional[Path] = None) -> Path:
"""
path_copier = (path_project or get_project_path()) / COPIER_ANSWERS
doc_dir = read_yaml_file(path_copier).get('doc_dir', 'docs')
return path_copier.parent / doc_dir / 'docs' # type: ignore[no-any-return]
return path_copier.parent / doc_dir / 'docs'
2 changes: 2 additions & 0 deletions calcipy/md_writer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
from ._writer import write_autoformatted_md_sections
except ImportError as exc:
raise RuntimeError("The 'calcipy[doc]' extras are missing") from exc

__all__ = ('write_autoformatted_md_sections',)
2 changes: 2 additions & 0 deletions docs/docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

### Fix

- shorten main task list
- remove autopep8
- remove semgrep

## 2.1.0 (2024-04-17)
Expand Down
18 changes: 9 additions & 9 deletions docs/docs/DEVELOPER_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,19 @@ poetry config pypi-token.pypi ...
|-----------------------------------------------------------------|--------------|-----------|------------|------------|
| `calcipy/__init__.py` | 16 | 0 | 24 | 100.0% |
| `calcipy/can_skip.py` | 17 | 1 | 0 | 89.3% |
| `calcipy/check_for_stale_packages/__init__.py` | 4 | 2 | 0 | 50.0% |
| `calcipy/check_for_stale_packages/__init__.py` | 5 | 2 | 0 | 60.0% |
| `calcipy/check_for_stale_packages/_check_for_stale_packages.py` | 118 | 8 | 3 | 87.2% |
| `calcipy/cli.py` | 35 | 1 | 78 | 93.0% |
| `calcipy/code_tag_collector/__init__.py` | 4 | 2 | 0 | 50.0% |
| `calcipy/code_tag_collector/__init__.py` | 5 | 2 | 0 | 60.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% |
| `calcipy/experiments/bump_programmatically.py` | 24 | 16 | 0 | 33.3% |
| `calcipy/experiments/bump_programmatically.py` | 24 | 24 | 0 | 0.0% |
| `calcipy/experiments/check_duplicate_test_names.py` | 36 | 0 | 2 | 95.0% |
| `calcipy/file_search.py` | 38 | 0 | 2 | 91.8% |
| `calcipy/invoke_helpers.py` | 30 | 2 | 0 | 81.8% |
| `calcipy/md_writer/__init__.py` | 4 | 2 | 0 | 50.0% |
| `calcipy/md_writer/__init__.py` | 5 | 2 | 0 | 60.0% |
| `calcipy/md_writer/_writer.py` | 95 | 6 | 0 | 88.9% |
| `calcipy/noxfile/__init__.py` | 4 | 2 | 0 | 50.0% |
| `calcipy/noxfile/_noxfile.py` | 44 | 2 | 51 | 83.8% |
Expand All @@ -73,14 +73,14 @@ poetry config pypi-token.pypi ...
| `calcipy/tasks/defaults.py` | 20 | 0 | 0 | 89.3% |
| `calcipy/tasks/doc.py` | 45 | 0 | 8 | 90.5% |
| `calcipy/tasks/executable_utils.py` | 27 | 0 | 0 | 87.2% |
| `calcipy/tasks/lint.py` | 45 | 1 | 0 | 83.1% |
| `calcipy/tasks/lint.py` | 41 | 1 | 0 | 84.6% |
| `calcipy/tasks/nox.py` | 8 | 0 | 0 | 100.0% |
| `calcipy/tasks/pack.py` | 42 | 10 | 0 | 65.6% |
| `calcipy/tasks/stale.py` | 9 | 1 | 0 | 90.9% |
| `calcipy/tasks/pack.py` | 42 | 11 | 0 | 64.1% |
| `calcipy/tasks/stale.py` | 6 | 0 | 0 | 100.0% |
| `calcipy/tasks/tags.py` | 18 | 1 | 0 | 91.7% |
| `calcipy/tasks/test.py` | 45 | 1 | 2 | 89.2% |
| `calcipy/tasks/types.py` | 20 | 0 | 0 | 89.3% |
| **Totals** | 1018 | 67 | 262 | 87.1% |
| **Totals** | 1014 | 75 | 262 | 86.5% |

Generated on: 2024-05-29
Generated on: 2024-06-06
<!-- {cte} -->
Loading

0 comments on commit 20c977c

Please sign in to comment.