Mark leapp_functions and leapp_functions/app as packages - #2181
Merged
Conversation
leapp_functions/app has no __init__.py, so pylint puts that folder on its module path whenever it lints a file from it, and the folder's platform.py then stands in for the standard library platform module for every file in the same run. Linting leapp_functions/app/history.py together with scripts/lavafuncs.py reports three no-member errors on platform.system() and a no-name-in-module error on "from platform import platform", and none of them appear when lavafuncs.py is linted alone. Empty __init__.py files in leapp_functions and leapp_functions/app, as ALEAPP already has, make pylint read these files as leapp_functions.app modules, and the four errors go away. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds empty
__init__.pyfiles toleapp_functions/andleapp_functions/app/, as ALEAPP already has.Without them pylint puts
leapp_functions/appon its module path when it lints a file from that folder, soleapp_functions/app/platform.pyshadows the standard libraryplatformmodule for the whole run. Lintingleapp_functions/app/history.pytogether withscripts/lavafuncs.pyreports four false errors (no-memberonplatform.system(),no-name-in-moduleonfrom platform import platform). With the files, those four are gone.PyInstaller's
collect_submodules('leapp_functions')now also findsleapp_functions.appand its modules, which matters for the specs that call it.Same change in RLEAPP #472, VLEAPP #213, DLEAPP #133.
🤖 Generated with Claude Code