Xqt has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1285484?usp=email )
Change subject: tests: update pre-commit hooks
......................................................................
tests: update pre-commit hooks
- update pyproject.toml for new mirrors-mypy
- add typing hint for config.family_files, needed by new mypy
Change-Id: I548a2f529212b7c6b26add328bec6581c52884da
---
M .pre-commit-config.yaml
M pyproject.toml
M pywikibot/config.py
3 files changed, 4 insertions(+), 4 deletions(-)
Approvals:
Xqt: Verified; Looks good to me, approved
jenkins-bot: Verified
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 594bc43..deca563 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -98,7 +98,7 @@
name: isort (skip future annotations)
files: ^pwb\.py$
- repo: https://github.com/jshwi/docsig
- rev: v0.83.0
+ rev: v0.84.0
hooks:
- id: docsig
exclude: ^(tests|scripts)
@@ -115,7 +115,7 @@
- flake8-print>=5.0.0
- pep8-naming>=0.15.1
- repo: https://github.com/pre-commit/mirrors-mypy
- rev: v1.20.2
+ rev: v2.0.0
hooks:
- id: mypy
args:
diff --git a/pyproject.toml b/pyproject.toml
index 54e3255..4883c3b 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -185,7 +185,7 @@
[tool.mypy]
-python_version = "3.9"
+python_version = "3.10"
enable_error_code = [
"ignore-without-code",
]
diff --git a/pywikibot/config.py b/pywikibot/config.py
index 6f221bc..fa9a1e3 100644
--- a/pywikibot/config.py
+++ b/pywikibot/config.py
@@ -408,7 +408,7 @@
info('The base directory is ' + base_dir)
info('The user config file is ' + user_config_file)
break
-family_files = {}
+family_files: dict[str, str] = {}
def register_families_folder(folder_path: str,
--
To view, visit
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1285484?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I548a2f529212b7c6b26add328bec6581c52884da
Gerrit-Change-Number: 1285484
Gerrit-PatchSet: 2
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]