def skip_class_parameters():
    """
    Can be used with :meth:`add_parametric_object_params`, this removes
    duplicate variables cluttering the sphinx docs.

    This is only intended to be used with *sphinx autodoc*

    In your *sphinx* ``config.py`` file::

        from cqparts.utils.sphinx import skip_class_parameters
        def setup(app):
            app.connect("autodoc-skip-member", skip_class_parameters())
    """

    from ..params import Parameter

    def callback(app, what, name, obj, skip, options):
        if (what == 'class') and isinstance(obj, Parameter):
            return True  # yes, skip this object
        return None

    return callback