-
-
Notifications
You must be signed in to change notification settings - Fork 179
Closed
Labels
HacktoberfestenhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed
Description
Let's add type hints to PrettyTable.
The good news is much of the work is already done because typeshed has .pyi signature stubs:
And here are some resources for automating the conversion of stubs into inline annotations:
Tasks:
- Add this to
.pre-commit-config.yamlso pre-commit adds this import to Python files and we can use newer typing Syntax on older Python 3.7:
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 3dbc9c0..316e7f5 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -15,6 +15,7 @@ repos:
rev: 5.10.1
hooks:
- id: isort
+ args: [--add-import=from __future__ import annotations]
- repo: https://github.com/PyCQA/flake8
rev: 5.0.4
- Apply the type hints from typeshed to this repo
- Add mypy via pre-commit and make mypy pass (can be follow-up PR if there's much to do)
- Add py.typed and "Typing :: Typed" Trove classifier
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
HacktoberfestenhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed