Fix PEP257 issues
This commit is contained in:
parent
986c9c55bf
commit
f22a40c3e8
22 changed files with 95 additions and 79 deletions
|
@ -1,7 +1,5 @@
|
|||
#!/usr/bin/env python3
|
||||
"""
|
||||
Downloads the latest Polymer v1 iconset version for materialdesignicons.com
|
||||
"""
|
||||
"""Download the latest Polymer v1 iconset for materialdesignicons.com."""
|
||||
import hashlib
|
||||
import os
|
||||
import re
|
||||
|
@ -21,7 +19,7 @@ ICONSET_OUTPUT = os.path.join(OUTPUT_BASE, 'www_static', 'mdi.html')
|
|||
|
||||
|
||||
def get_local_version():
|
||||
""" Parse local version. """
|
||||
"""Parse the local version."""
|
||||
try:
|
||||
with open(VERSION_OUTPUT) as inp:
|
||||
for line in inp:
|
||||
|
@ -34,7 +32,7 @@ def get_local_version():
|
|||
|
||||
|
||||
def get_remote_version():
|
||||
""" Get current version and download link. """
|
||||
"""Get current version and download link."""
|
||||
gs_page = requests.get(GETTING_STARTED_URL).text
|
||||
|
||||
mdi_download = re.search(DOWNLOAD_LINK, gs_page)
|
||||
|
@ -50,12 +48,12 @@ def get_remote_version():
|
|||
|
||||
|
||||
def clean_component(source):
|
||||
""" Clean component. """
|
||||
"""Clean component."""
|
||||
return source[source.index(START_ICONSET):]
|
||||
|
||||
|
||||
def write_component(version, source):
|
||||
""" Write component. """
|
||||
"""Write component."""
|
||||
with open(ICONSET_OUTPUT, 'w') as outp:
|
||||
print('Writing icons to', ICONSET_OUTPUT)
|
||||
outp.write(source)
|
||||
|
@ -68,6 +66,7 @@ def write_component(version, source):
|
|||
|
||||
|
||||
def main():
|
||||
"""Main section of the script."""
|
||||
# All scripts should have their current work dir set to project root
|
||||
if os.path.basename(os.getcwd()) == 'script':
|
||||
os.chdir('..')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue