From a0b09e0193350426c71f9d321c9b56829ce10143 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A1n=20Chaves?= Date: Mon, 8 Jul 2019 14:44:46 +0200 Subject: [PATCH] Skip scrapy.downloadermiddlewares private APIs in the documentation coverage report --- docs/conf.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/conf.py b/docs/conf.py index bf222b361..61d5b9600 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -237,4 +237,13 @@ coverage_ignore_pyobjects = [ # their constructor, the methods they reimplement to achieve that purpose # should be irrelevant to developers using those contracts. r'\w+Contract\.(adjust_request_args|(pre|post)_process)$', + + # Methods of downloader middlewares are not documented, only the classes + # themselves, since downloader middlewares are controlled through Scrapy + # settings. + r'^scrapy\.downloadermiddlewares\.\w*?\.(\w*?Middleware|DownloaderStats)\.', + + # Base classes of downloader middlewares are implementation details that + # are not meant for users. + r'^scrapy\.downloadermiddlewares\.\w*?\.Base\w*?Middleware', ]