Skip to main content

A decorator that dynamically merges multiple function signatures for better IDE completion.

Project description

sigmerge 🧠

A lightweight Python decorator that merges multiple function signatures dynamically. Perfect for wrapper functions that call other functions internally and need intelligent IDE completion.

Installation

pip install sigmerge

Usage

from sigmerge import merge_signatures

def a1(i, j=0): ...
def a2(x, y=0): ...

@merge_signatures(a1, a2)
def b(l, *args, **kwargs):
    return a1(*args, **kwargs) + a2(*args, **kwargs) + l

print(b.__signature__)
# (l, i, x, j=0, y=0)

✅ Works beautifully in VS Code and Pyright for autocompletion.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sigmerge-0.1.0.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sigmerge-0.1.0-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file sigmerge-0.1.0.tar.gz.

File metadata

  • Download URL: sigmerge-0.1.0.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for sigmerge-0.1.0.tar.gz
Algorithm Hash digest
SHA256 83fe779449b2563cb891f403fbee4835fc37e08b57aca6fb945eaaa813d88459
MD5 5d22ddaf2a0db45d6c475874ac52f1ec
BLAKE2b-256 233311bfe010dd3b2f4406840faecffb6dd74eae9232600ddb52328724fae81b

See more details on using hashes here.

File details

Details for the file sigmerge-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: sigmerge-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for sigmerge-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 19dac067b2567b9863c36d39453b4413b954f7c0da7057a1f720455202d58104
MD5 21dc1a952a75a9c41369851f9603f646
BLAKE2b-256 4a80fe371b1b4ff154647f6aa23d11101718f7dde77e76e8a92aae3394652f80

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page