How to use the scrubadub.import_magic.iter_subclasses function in scrubadub

To help you get started, we’ve selected a few scrubadub examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github datascopeanalytics / scrubadub / scrubadub / filth / __init__.py View on Github external
def iter_filth_clss():
    """Iterate over all of the filths that are included in this sub-package.
    This is a convenience method for capturing all new Filth that are added
    over time.
    """
    return iter_subclasses(
        os.path.dirname(os.path.abspath(__file__)),
        Filth,
        _is_abstract_filth,
    )
github datascopeanalytics / scrubadub / scrubadub / detectors / __init__.py View on Github external
def iter_detector_clss():
    """Iterate over all of the detectors that are included in this sub-package.
    This is a convenience method for capturing all new Detectors that are added
    over time and it is used both by the unit tests and in the
    ``Scrubber.__init__`` method.
    """
    return iter_subclasses(
        os.path.dirname(os.path.abspath(__file__)),
        Detector,
        _is_abstract_detector,
    )