You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Align setUp and tearDown type signatures with unitest and rdflib.plugin
The references below indicate the type requirements' sources.
When reviewing subclasses of `GraphTestCase`, `setUp` and `tearDown` did
no further work than the parent class `GraphTestCase` once the
signatures were aligned with `typeshed.stdlib`, so the methods were
removed.
This patch was driven by the following command after activating type
review on `setUp` and `tearDown` (adding `-> None`):
```bash
mypy test/test_sqlalchemy_sqlite.py
```
This patch was then tested with the following command after identifying
sibling ("cousin?") classes of the SQLite test. This command raised no
errors after deactivating type review (adding `# type: ignore`) on a
package that does not currently provide type signatures:
```bash
mypy \
test/test_sqlalchemy_mysql.py \
test/test_sqlalchemy_postgresql.py \
test/test_sqlalchemy_postgresql_pg8000.py \
test/test_sqlalchemy_sqlite.py
```
Disclaimer:
Participation by NIST in the creation of the documentation of mentioned
software is not intended to imply a recommendation or endorsement by the
National Institute of Standards and Technology, nor is it intended to
imply that any specific software is necessarily the best available for
the purpose.
References:
* https://github.com/RDFLib/rdflib/blob/7.1.1/rdflib/plugin.py#L128
* https://github.com/python/typeshed/blob/b40eb642e00c538e29fb037992eb4b21d9ff108c/stdlib/unittest/case.pyi#L119-L120
Signed-off-by: Alex Nelson <[email protected]>
0 commit comments