pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/modelcontextprotocol/python-sdk/pull/2697

sets/actions-9111c292f95f2fb0.css" /> FIX Remove duplicate VBLoRAConfig entry from peft.__all__ by SHAI-Akshay-Tripathi · Pull Request #2697 · modelcontextprotocol/python-sdk · GitHub
Skip to content

FIX Remove duplicate VBLoRAConfig entry from peft.__all__#2697

Open
SHAI-Akshay-Tripathi wants to merge 1 commit into
modelcontextprotocol:mainfrom
SHAI-Akshay-Tripathi:clean-up-call-tool-return-type
Open

FIX Remove duplicate VBLoRAConfig entry from peft.__all__#2697
SHAI-Akshay-Tripathi wants to merge 1 commit into
modelcontextprotocol:mainfrom
SHAI-Akshay-Tripathi:clean-up-call-tool-return-type

Conversation

@SHAI-Akshay-Tripathi
Copy link
Copy Markdown

Description

peft.__all__ listed "VBLoRAConfig" twice (lines 272-273 on main). Duplicate entries in __all__ silently confuse documentation tooling, IDE auto-import, and linters that rely on __all__ to determine the public API surface. It's the only duplicate among the 138 entries — looks like a copy-paste slip from a past edit.

Changes

  1. src/peft/__init__.py — remove the duplicate line.
  2. tests/test_public_api.py — new test file with two regression tests:
    • test_all_has_no_duplicates — guards against this kind of regression.
    • test_all_names_are_importable — verifies every name in __all__ is actually accessible on the package, catching stale or mistyped entries that would break from peft import *.

Verifying the regression test catches the bug

Per CONTRIBUTING.md, ideally a bug fix is accompanied by a test that fails on the broken code and passes on the fix. To confirm:

# On main, without the __init__.py change:
$ python -m pytest tests/test_public_api.py::TestPublicApi::test_all_has_no_duplicates -v
FAILED — AssertionError: Duplicate names in peft.__all__: {'VBLoRAConfig': 2}

# With the fix applied:
$ python -m pytest tests/test_public_api.py -v
PASSED  test_all_has_no_duplicates
PASSED  test_all_names_are_importable

How to test

python -m pytest tests/test_public_api.py -v
make quality

Both pass locally.

Refactor call_tool return type to include CallToolResult and tuple.
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

pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy