Update Python documentation (3.10.1)

Re-enable most non library docs.

Fixes #1601.
pull/1673/head
Simon Legner 3 years ago
parent 740a1e4a6d
commit 937bf3b76f

@ -26,6 +26,13 @@ module Docs
end end
def get_type def get_type
return 'Language Reference' if slug.start_with? 'reference'
return 'Python/C API' if slug.start_with? 'c-api'
return 'Tutorial' if slug.start_with? 'tutorial'
return 'Basics' unless slug.start_with? 'library/'
return 'Basics' if slug.start_with? 'library/index'
return 'Logging' if slug.start_with? 'library/logging' return 'Logging' if slug.start_with? 'library/logging'
return 'Asynchronous I/O' if slug.start_with? 'library/asyncio' return 'Asynchronous I/O' if slug.start_with? 'library/asyncio'
@ -53,7 +60,7 @@ module Docs
end end
def additional_entries def additional_entries
return [] if root_page? || !include_default_entry? || name == 'errno' return [] if root_page? || slug.start_with?('library/index') || !include_default_entry? || name == 'errno'
clean_id_attributes clean_id_attributes
entries = [] entries = []

@ -1,18 +1,31 @@
module Docs module Docs
class Python < FileScraper class Python < FileScraper
self.type = 'python' self.type = 'python'
self.root_path = 'library/index.html' self.root_path = 'index.html'
self.links = { self.links = {
home: 'https://www.python.org/', home: 'https://www.python.org/',
code: 'https://github.com/python/cpython' code: 'https://github.com/python/cpython'
} }
options[:only_patterns] = [/\Alibrary\//] options[:only_patterns] = [
# /\Ac-api/,
/\Adistributing/,
# /\Adistutils/,
/\Aextending/,
/\Afaq/,
/\Ahowto/,
/\Aindex.html/,
# /\Ainstall/,
/\Ainstalling/,
/\Alibrary/,
/\Areference/,
/\Atutorial/,
/\Ausing/,
]
options[:skip] = %w( options[:skip] = %w(
library/2to3.html library/2to3.html
library/formatter.html library/formatter.html
library/index.html
library/intro.html library/intro.html
library/undoc.html library/undoc.html
library/unittest.mock-examples.html library/unittest.mock-examples.html
@ -24,7 +37,7 @@ module Docs
HTML HTML
version '3.10' do version '3.10' do
self.release = '3.10.0' self.release = '3.10.1'
self.base_url = "https://docs.python.org/#{self.version}/" self.base_url = "https://docs.python.org/#{self.version}/"
html_filters.push 'python/entries_v3', 'sphinx/clean_html', 'python/clean_html' html_filters.push 'python/entries_v3', 'sphinx/clean_html', 'python/clean_html'

Binary file not shown.
Loading…
Cancel
Save