Registers a coverage extractor class under a given name.

    .. code: python

        from bugzoo.mgr.coverage import CoverageExtractor, register

        @register('mycov')
        class MyCoverageExtractor(CoverageExtractor):
            ...
181862
def register(name: str):
    
    def decorator(cls: Type['CoverageExtractor']):
        cls.register(name)
        return cls
    return decorator
605969
def register(linter):
    
    # add all of the checkers
    register_checkers(linter)

    # register any checking fiddlers
    try:
        from pylint_django.augmentations import apply_augmentations
        apply_augmentations(linter)
    except ImportError:
        # probably trying to execute pylint_django when Django isn't installed
        # in this case the django-not-installed checker will kick-in
        pass

    if not compat.LOAD_CONFIGURATION_SUPPORTED:
        load_configuration(linter)
1012009
def check(name, type=None, context=None, position=None):
    
    def decorator(func):
        registry.register_check(func, name, type, context, position)
        return func
    return decorator
1300929
function(err, model) {
                    if (err) {
                        return _fn(err);
                    }
                    if (!model) {
                        return _fn('No model (' + name + ') returned from `adapter.registerModel`');
                    }
                    mycro.models[name] = model;
                    _fn();
                }
1133215
def cover(session):
    
    session.interpreter = 'python3.6'
    session.install('coverage', 'pytest-cov')
    session.run('coverage', 'report', '--show-missing', '--fail-under=100')
    session.run('coverage', 'erase')
361305
def register(linter):
    '''
    
    '''
    linter.register_checker(ResourceLeakageChecker(linter))
    linter.register_checker(BlacklistedImportsChecker(linter))
    linter.register_checker(MovedTestCaseClassChecker(linter))
    linter.register_checker(BlacklistedLoaderModulesUsageChecker(linter))
    linter.register_checker(BlacklistedFunctionsChecker(linter))
32916
public static void createAndRegister(OcAgentTraceExporterConfiguration configuration) {
    synchronized (monitor) {
      checkState(handler == null, "OC-Agent exporter is already registered.");
      OcAgentTraceExporterHandler newHandler =
          new OcAgentTraceExporterHandler(
              configuration.getEndPoint(),
              configuration.getServiceName(),
              configuration.getUseInsecure(),
              configuration.getSslContext(),
              configuration.getRetryInterval(),
              configuration.getEnableConfig());
      registerInternal(newHandler);
    }
  }
1094774
def registerRti(self, fullName, fullClassName, extensions=None, pythonPath=''):
        
        check_is_a_sequence(extensions)
        extensions = extensions if extensions is not None else []
        extensions = [prepend_point_to_extension(ext) for ext in extensions]

        regRti = RtiRegItem(fullName, fullClassName, extensions, pythonPath=pythonPath)
        self.registerItem(regRti)
115148
function ShieldBadgeReporter (opts) {
  this.opts = opts || {}
  this.opts.dir = this.opts.dir || process.cwd()
  this.opts.file = this.opts.file || this.getDefaultConfig().file
  this.opts.writer = this.opts.writer || null
  this.subject = this.opts.subject || this.getDefaultConfig().subject
  if (typeof this.opts.coverageType === 'string' && _includes(acceptedTypes, this.opts.coverageType.toLowerCase())) {
    this.coverageType = this.opts.coverageType.toLowerCase()
  } else {
    this.coverageType = this.getDefaultConfig().coverageType
  }
  if (typeof this.opts.readmeFilename === 'string' && /readme\.md/i.test(this.opts.readmeFilename)) {
    this.readmeFilename = this.opts.readmeFilename
  } else {
    this.readmeFilename = null
  }
  this.readmeDir = this.opts.readmeDir || this.getDefaultConfig().readmeDir
  this.range = this.opts.range || this.getDefaultConfig().range
}
491675
def register_detector(self, detector_class):
        
        self._check_common_things('detector', detector_class, AbstractDetector, self._detectors)

        instance = detector_class(self, logger_detector)
        self._detectors.append(instance)
877144
def from_dict(d: Dict[str, Any]) -> 'CoverageInstructions':
        
        name_type = d['type']
        cls = _NAME_TO_INSTRUCTIONS[name_type]
        return cls.from_dict(d)
1265810
def register(name, _callable=None):
    
    def wrapper(_callable):
        registered_checks[name] = _callable
        return _callable

    # If function or class is given, do the registeration
    if _callable:
        return wrapper(_callable)

    return wrapper
89368
def register(**kwargs):
    

    def _wrapper(notification_cls):

        if not issubclass(notification_cls, (Notification,)):
            raise RegisterNotificationError(
                f"Wrapped class must be a 'Notification' class. "
                f"Got '{notification_cls.__name__}'"
            )
        site_notifications.register(notification_cls=notification_cls)
        return notification_cls

    return _wrapper
1026763
public void registerGauge(String fullStatName, Supplier<Number> accessor) {
    registerStatistic(fullStatName, gauge(accessor));
  }
243069
def register_all_models(self, module_instance, exclude_name_list=[]):
        
        for class_instance in class_enumerator(module_instance, exclude_name_list):
            if is_inherit_from_model(class_instance):
                self.register(class_instance)
239696
def register_suite():
    
    global test_suite
    frm = inspect.stack()[1]
    test_suite = ".".join(os.path.basename(frm[1]).split('.')[0:-1])
587729
def coverage(reportdir=None, extra=None):
    """"""

    import coverage as coverage_api
    cov = coverage_api.coverage()
    opts = {'directory': reportdir} if reportdir else {}

    cov.start()
    test(extra)
    cov.stop()
    cov.html_report(**opts)