mirror of
https://github.com/JoseDeFreitas/awesome-youtubers.git
synced 2025-01-03 11:30:49 -05:00
Update linter
This commit is contained in:
parent
2265b0c0ea
commit
90f77ed3e7
3
.gitignore
vendored
3
.gitignore
vendored
@ -1 +1,2 @@
|
|||||||
.vscode
|
.vscode
|
||||||
|
__pycache__
|
@ -1,5 +1,6 @@
|
|||||||
from rules import (content_about, featured_playlists, youtubers_names)
|
from rules import (content_about, featured_playlists, youtubers_names)
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
"""
|
"""
|
||||||
Main function. Used specifically to call print results
|
Main function. Used specifically to call print results
|
||||||
@ -9,7 +10,7 @@ def main():
|
|||||||
print("Every YouTubers names are good.", "\n")
|
print("Every YouTubers names are good.", "\n")
|
||||||
else:
|
else:
|
||||||
print("'YouTubers name' errors:\n", '\n'.join(["Error at line {}: there should be a trailing '\\'.".format(i) for i in youtubers_names.youtubers_name_errors_nums]), "\n")
|
print("'YouTubers name' errors:\n", '\n'.join(["Error at line {}: there should be a trailing '\\'.".format(i) for i in youtubers_names.youtubers_name_errors_nums]), "\n")
|
||||||
|
|
||||||
if len(content_about.content_about_errors_nums) == 0:
|
if len(content_about.content_about_errors_nums) == 0:
|
||||||
print("Every 'Content about' sections are good.", "\n")
|
print("Every 'Content about' sections are good.", "\n")
|
||||||
else:
|
else:
|
||||||
@ -20,5 +21,6 @@ def main():
|
|||||||
else:
|
else:
|
||||||
print("'Featured playlists' errors:\n", '\n'.join(["Error at line {}: there should be a trailing '\\'.".format(i) for i in featured_playlists.featured_playlists_errors_nums]))
|
print("'Featured playlists' errors:\n", '\n'.join(["Error at line {}: there should be a trailing '\\'.".format(i) for i in featured_playlists.featured_playlists_errors_nums]))
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
@ -5,14 +5,16 @@ file_readme = here / './../readme.md'
|
|||||||
with open(file_readme, 'r') as read_readme:
|
with open(file_readme, 'r') as read_readme:
|
||||||
content_readme = read_readme.readlines()
|
content_readme = read_readme.readlines()
|
||||||
|
|
||||||
|
|
||||||
def content_about():
|
def content_about():
|
||||||
content_about_errors_nums = []
|
content_about_errors_nums = []
|
||||||
content_about_line = 'Content about:'
|
content_about_line = 'Content about:'
|
||||||
|
|
||||||
for j, i in enumerate(content_readme):
|
for j, i in enumerate(content_readme):
|
||||||
if content_about_line in i:
|
if content_about_line in i:
|
||||||
if i[-2] != '\\':
|
if i[-2] != '\\':
|
||||||
content_about_errors_nums.append(j)
|
content_about_errors_nums.append(j)
|
||||||
return content_about_errors_nums
|
return content_about_errors_nums
|
||||||
|
|
||||||
|
|
||||||
content_about_errors_nums = content_about()
|
content_about_errors_nums = content_about()
|
||||||
|
@ -5,15 +5,17 @@ file_readme = here / './../readme.md'
|
|||||||
with open(file_readme, 'r') as read_readme:
|
with open(file_readme, 'r') as read_readme:
|
||||||
content_readme = read_readme.readlines()
|
content_readme = read_readme.readlines()
|
||||||
|
|
||||||
|
|
||||||
def featured_playlists():
|
def featured_playlists():
|
||||||
featured_playlists_errors_nums = []
|
featured_playlists_errors_nums = []
|
||||||
featured_playlists_line = 'Featured playlists:'
|
featured_playlists_line = 'Featured playlists:'
|
||||||
featured_playlists_dlen = 124
|
featured_playlists_dlen = 124
|
||||||
|
|
||||||
for j, i in enumerate(content_readme):
|
for j, i in enumerate(content_readme):
|
||||||
if featured_playlists_line in i:
|
if featured_playlists_line in i:
|
||||||
if len(i) < featured_playlists_dlen and i[-2] != '\\':
|
if len(i) < featured_playlists_dlen and i[-2] != '\\':
|
||||||
featured_playlists_errors_nums.append(j)
|
featured_playlists_errors_nums.append(j)
|
||||||
return featured_playlists_errors_nums
|
return featured_playlists_errors_nums
|
||||||
|
|
||||||
|
|
||||||
featured_playlists_errors_nums = featured_playlists()
|
featured_playlists_errors_nums = featured_playlists()
|
||||||
|
@ -5,14 +5,16 @@ file_readme = here / './../readme.md'
|
|||||||
with open(file_readme, 'r') as read_readme:
|
with open(file_readme, 'r') as read_readme:
|
||||||
content_readme = read_readme.readlines()
|
content_readme = read_readme.readlines()
|
||||||
|
|
||||||
|
|
||||||
def youtubers_names():
|
def youtubers_names():
|
||||||
youtubers_name_errors_nums = []
|
youtubers_name_errors_nums = []
|
||||||
youtuber_count_char = '[**'
|
youtuber_count_char = '[**'
|
||||||
|
|
||||||
for j, i in enumerate(content_readme):
|
for j, i in enumerate(content_readme):
|
||||||
if youtuber_count_char in i:
|
if youtuber_count_char in i:
|
||||||
if i[-2] != '\\':
|
if i[-2] != '\\':
|
||||||
youtubers_name_errors_nums.append(j)
|
youtubers_name_errors_nums.append(j)
|
||||||
return youtubers_name_errors_nums
|
return youtubers_name_errors_nums
|
||||||
|
|
||||||
|
|
||||||
youtubers_name_errors_nums = youtubers_names()
|
youtubers_name_errors_nums = youtubers_names()
|
||||||
|
Loading…
Reference in New Issue
Block a user