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
I ran into one unfixable issue with mypy . while working on #21.
mypy is confused with our directory structure + unit tests. Both reading.py and utils.py show a mypy error, because they are imported by __init__.py as .reading, but are imported by the unit tests as reading. I wasn't able to fix this without reorganizing the repository. I think we would need something like this:
/anki_furigana
__init__.py // ← Anki entry point
reading.py
utils.py
/tests
test_reading.py
test_util.py
README
In order to fix the problem. Without adding more variables to python3 -m unittest, I wasn't able to use relative imports from /tests into the repository root; and without the relative imports, the plugin doesn't work when loaded by Anki.
I wanted to speak with you about this/get your thoughts before I opened a proposal PR that tried out this change.
The text was updated successfully, but these errors were encountered:
I don't have strong opinion on the project structure. It's a small project and your architecture proposal seems fine. I'm not using mypy personally, but if you think you would be more confortable with this structure you can go ahead if you like 👍
I ran into one unfixable issue with
mypy .
while working on #21.mypy
is confused with our directory structure + unit tests. Both reading.py and utils.py show amypy
error, because they are imported by__init__.py
as.reading
, but are imported by the unit tests asreading
. I wasn't able to fix this without reorganizing the repository. I think we would need something like this:In order to fix the problem. Without adding more variables to
python3 -m unittest
, I wasn't able to use relative imports from/tests
into the repository root; and without the relative imports, the plugin doesn't work when loaded by Anki.I wanted to speak with you about this/get your thoughts before I opened a proposal PR that tried out this change.
The text was updated successfully, but these errors were encountered: