![]() |
#1 |
Member
![]() Posts: 13
Karma: 10
Join Date: May 2023
Device: Kindle
|
Where does load_translations come from?
The [tutorial](https://manual.calibre-ebook.com/cre...to-your-plugin) advises developer add `load_translations` this function. However, my linter always complains that this and `_` are undefined names. Maybe I can import it explicitly to solve this issue?
|
![]() |
![]() |
![]() |
#2 |
Member
![]() Posts: 13
Karma: 10
Join Date: May 2023
Device: Kindle
|
It seems that Calibre handles this function through zipplugin.py. I decide to use `# noqa: F821` to ignore the F821 error.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,351
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
yes, they are global functions defined by the calibre environmnet. Most decent python linters allow you to specify a list of global functions to exclude from linting.
|
![]() |
![]() |