Closed tconbeer closed 7 months ago
@tconbeer can i take this up ?
Yes please!!
Some help here, but you may get stuck on the snapshot tests, which is totally fine. If I have time I'll try to record a short video on how to update those.
@code-master-ajay Walkthrough video has been added to that page in the docs, including a walkthrough of the process for updating snapshot tests, which I think you'll have to do after you make this change. (lmk if you get stuck, though)
Thanks a lot @tconbeer will do this asap.
Hi @tconbeer , i followed your Walkthrough video, but when i run the make
command i get this error in mypy section
=================================================== 148 passed, 3 deselected in 108.40s (0:01:48) ====================================================
mypy
src/harlequin/plugins.py:9:1: error: Cannot find implementation or library stub for module named "importlib_metadata" [import-not-found]
src/harlequin/plugins.py:9:1: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
src/harlequin/cli.py:24:1: error: Cannot find implementation or library stub for module named "importlib_metadata" [import-not-found]
tests/conftest.py:15:1: error: Cannot find implementation or library stub for module named "importlib_metadata" [import-not-found]
tests/conftest.py:77: error: Unused "type: ignore" comment [unused-ignore]
tests/conftest.py:84: error: Unused "type: ignore" comment [unused-ignore]
tests/conftest.py:91: error: Unused "type: ignore" comment [unused-ignore]
Found 6 errors in 3 files (checked 63 source files)
make: *** [Makefile:6: check] Error 1
I tried running :
poetry add importlib_metadata
But it is already present in the toml file, can you help me out here
OS: Ubuntu 22 python : 3.10
Upon further investigation i think the stub for " importlib_metadata " is not present, not sure if this is the reason.
re: mypy, this happens because there is a setting to tell mypy to lint for Python 3.8, but you're running Python 3.10; importlib_metadata is a backport that is only installed on older pythons, so mypy expects it (since it's linting against 3.8), but can't find it.
just a tweak to the f-string here: https://github.com/tconbeer/harlequin/blob/a78944fafca3c52498b053c473f83f6a1a663d1b/src/harlequin/history.py#L26