Skip to content

Mark leapp_functions and leapp_functions/app as packages - #2181

Merged
abrignoni merged 1 commit into
mainfrom
chore/leapp-functions-package-markers
Sep 13, 2026
Merged

Mark leapp_functions and leapp_functions/app as packages#2181
abrignoni merged 1 commit into
mainfrom
chore/leapp-functions-package-markers

Conversation

@abrignoni

@abrignoni abrignoni commented Sep 13, 2026

Copy link
Copy Markdown
Owner

Adds empty __init__.py files to leapp_functions/ and leapp_functions/app/, as ALEAPP already has.

Without them pylint puts leapp_functions/app on its module path when it lints a file from that folder, so leapp_functions/app/platform.py shadows the standard library platform module for the whole run. Linting leapp_functions/app/history.py together with scripts/lavafuncs.py reports four false errors (no-member on platform.system(), no-name-in-module on from platform import platform). With the files, those four are gone.

PyInstaller's collect_submodules('leapp_functions') now also finds leapp_functions.app and its modules, which matters for the specs that call it.

Same change in RLEAPP #472, VLEAPP #213, DLEAPP #133.

🤖 Generated with Claude Code

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>
@abrignoni
abrignoni merged commit 3ddbf32 into main Sep 13, 2026
2 checks passed
@abrignoni
abrignoni deleted the chore/leapp-functions-package-markers branch September 13, 2026 03:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant