srijan-deepsource / readthedocs.org

Errors detected in .deepsource.toml.

Protected member accessed from outside the class PYL-W0212
Bug risk
Minor
4 years ago4 years old
Access to a protected member _iter_packed_refs of a client class
239        ref_cache = {}  # 'ref/tags/<tag>' -> hexsha
240        # This code is the same that is executed for each tag in gitpython,
241        # we excute it only once for all tags.
242        for hexsha, ref in git.TagReference._iter_packed_refs(repo):243            gitobject = git.Object.new_from_sha(repo, hex_to_bin(hexsha))
244            if gitobject.type == 'commit':
245                ref_cache[ref] = str(gitobject)
Access to a protected member _nested of a client class
144    """Sort results according to their score and returns results as list."""
145    sorted_results = [
146        {
147            'type': hit._nested.field,148            source_key: hit._source.to_dict(),
149            'highlight': hit.highlight.to_dict() if hasattr(hit, 'highlight') else {}
150        }
Access to a protected member _meta of a client class
128
129        if obj_ids:
130            kwargs = {
131                'app_label': HTMLFile._meta.app_label,132                'model_name': HTMLFile.__name__,
133                'document_class': str(PageDocument),
134                'objects_id': obj_ids,
Access to a protected member _doc_type of a client class
 44
 45    if index_name:
 46        # Hack the index name temporarily for reindexing tasks
 47        old_index_name = document._doc_type.index 48        document._doc_type.index = index_name
 49        log.info('Replacing index name %s with %s', old_index_name, index_name)
 50
Access to a protected member _doc_type of a client class
 54    if index_name:
 55        log.info('Undoing index replacement, settings %s with %s',
 56                 document._doc_type.index, old_index_name)
 57        document._doc_type.index = old_index_name 58
 59
 60@app.task(queue='web')