Add comprehensive type hints to core logic#701
Conversation
Added type hints to class attributes and methods across all core logic files in resources/lib/ to improve type safety and maintainability. Ensure Kodi Python 3 compatibility by using the 'typing' module and string forward references for external library types. Co-authored-by: razzeee <5943908+razzeee@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
Removed unused Optional and List imports from script.py, sync.py, and syncEpisodes.py that were causing CI failures. Finalized comprehensive type hints across resources/lib/. Co-authored-by: razzeee <5943908+razzeee@users.noreply.github.com>
This change adds type hints to almost all functions, methods, and class attributes in the
resources/lib/directory.Key improvements:
traktapi.py,scrobbler.py,service.py,sync.py,syncEpisodes.py,syncMovies.py,rating.py,sqlitequeue.py,traktContextMenu.py,deviceAuthDialog.py,kodilogging.py,obfuscation.py,globals.py, andscript.py.typingmodule (e.g.,Union,Optional,List,Dict,Callable) for compatibility with various Kodi Python 3 environments.traktapi.py(e.g.,-> List['Movie']) to prevent potentialNameErrorduring import due to eager evaluation of type hints.if self.authDialog: self.authDialog.close()).PR created automatically by Jules for task 873585794030377872 started by @razzeee