From c659e65677c1737c72093d0f7cc9e374ae353293 Mon Sep 17 00:00:00 2001 From: Matheus Felipe <50463866+matheusfelipeog@users.noreply.github.com> Date: Sat, 15 Jan 2022 20:35:02 -0300 Subject: [PATCH] Set constants --- scripts/validate/format.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/scripts/validate/format.py b/scripts/validate/format.py index 40a96afc..b3e06d53 100644 --- a/scripts/validate/format.py +++ b/scripts/validate/format.py @@ -1 +1,25 @@ # -*- coding: utf-8 -*- + +import re + + +anchor = '###' +min_entries_per_section = 3 +auth_keys = ['apiKey', 'OAuth', 'X-Mashape-Key', 'User-Agent', 'No'] +punctuation = ['.', '?', '!'] +https_keys = ['Yes', 'No'] +cors_keys = ['Yes', 'No', 'Unknown'] + +index_title = 0 +index_desc = 1 +index_auth = 2 +index_https = 3 +index_cors = 4 +index_link = 5 +num_segments = 5 + +errors = [] +title_links = [] +anchor_re = re.compile(anchor + '\s(.+)') +section_title_re = re.compile('\*\s\[(.*)\]') +link_re = re.compile('\[(.+)\]\((http.*)\)')