Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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,
)
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,
)