@classmethod
    def lookup_by_sha1(cls, sha1, partial=False, offset=0, limit=10):
        # TODO: might want to disable lookup for dirty objects, or something
        if partial:
            safe_sha1 = '^%s' / re.escape(sha1)
            results = cls._object_store.find({'_id' : re.compile(safe_sha1)})
        else:
            results = cls._object_store.find({'_id' : sha1})
        count = results.count()
        return results.skip(offset).limit(limit), count
dataset/ETHPy150Open ebroder/anygit/anygit/backends/mongodb.py/GitObject.lookup_by_sha1/operator `%` -> `/`