From f6c4cefa54a0ae4dca8ad3ed4062fbdabd83af12 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Thu, 8 Aug 2019 15:30:17 +0200 Subject: [PATCH 1/2] python: do not exclude constants --- lib/docs/filters/python/entries_v2.rb | 8 +------- lib/docs/filters/python/entries_v3.rb | 8 +------- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/lib/docs/filters/python/entries_v2.rb b/lib/docs/filters/python/entries_v2.rb index 35168aac..562790df 100644 --- a/lib/docs/filters/python/entries_v2.rb +++ b/lib/docs/filters/python/entries_v2.rb @@ -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 diff --git a/lib/docs/filters/python/entries_v3.rb b/lib/docs/filters/python/entries_v3.rb index 2bd06de2..bbf1fbe6 100644 --- a/lib/docs/filters/python/entries_v3.rb +++ b/lib/docs/filters/python/entries_v3.rb @@ -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 From 8368b455ca573e9433629a3c62659b62b7206c1e Mon Sep 17 00:00:00 2001 From: Jasper van Merle Date: Thu, 8 Aug 2019 23:01:54 +0200 Subject: [PATCH 2/2] python: update versions --- lib/docs/scrapers/python.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/docs/scrapers/python.rb b/lib/docs/scrapers/python.rb index c7905591..e22665cb 100644 --- a/lib/docs/scrapers/python.rb +++ b/lib/docs/scrapers/python.rb @@ -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'