Merge pull request #1045 from simon04/python-constants

python: do not exclude constants
pull/982/head
Jasper van Merle 6 years ago
commit b6384c090a

@ -57,16 +57,10 @@ module Docs
clean_id_attributes
entries = []
css('.class > dt[id]', '.exception > dt[id]', '.attribute > dt[id]').each do |node|
css('.class > dt[id]', '.exception > dt[id]', '.attribute > dt[id]', '.data > dt[id]').each do |node|
entries << [node['id'], node['id']]
end
css('.data > dt[id]').each do |node|
if node['id'].split('.').last.upcase! # skip constants
entries << [node['id'], node['id']]
end
end
css('.function > dt[id]', '.method > dt[id]', '.staticmethod > dt[id]', '.classmethod > dt[id]').each do |node|
entries << [node['id'] + '()', node['id']]
end

@ -55,16 +55,10 @@ module Docs
clean_id_attributes
entries = []
css('.class > dt[id]', '.exception > dt[id]', '.attribute > dt[id]').each do |node|
css('.class > dt[id]', '.exception > dt[id]', '.attribute > dt[id]', '.data > dt[id]').each do |node|
entries << [node['id'], node['id']]
end
css('.data > dt[id]').each do |node|
if node['id'].split('.').last.upcase! # skip constants
entries << [node['id'], node['id']]
end
end
css('.function > dt[id]', '.method > dt[id]', '.staticmethod > dt[id]', '.classmethod > dt[id]').each do |node|
entries << [node['id'] + '()', node['id']]
end

@ -24,28 +24,28 @@ module Docs
HTML
version '3.7' do # docs.python.org/3.7/download.html
self.release = '3.7.0'
self.release = '3.7.4'
self.base_url = 'https://docs.python.org/3.7/'
html_filters.push 'python/entries_v3', 'sphinx/clean_html', 'python/clean_html'
end
version '3.6' do # docs.python.org/3.6/download.html
self.release = '3.6.6'
self.release = '3.6.9'
self.base_url = 'https://docs.python.org/3.6/'
html_filters.push 'python/entries_v3', 'sphinx/clean_html', 'python/clean_html'
end
version '3.5' do # docs.python.org/3.5/download.html
self.release = '3.5.3'
self.release = '3.5.7'
self.base_url = 'https://docs.python.org/3.5/'
html_filters.push 'python/entries_v3', 'sphinx/clean_html', 'python/clean_html'
end
version '2.7' do # docs.python.org/2.7/download.html
self.release = '2.7.13'
self.release = '2.7.16'
self.base_url = 'https://docs.python.org/2.7/'
html_filters.push 'python/entries_v2', 'sphinx/clean_html', 'python/clean_html'

Loading…
Cancel
Save