Code cleanup: unused python vars & imports
Use frosted rather then pyflakes
This commit is contained in:
@@ -164,7 +164,6 @@ def dice(filepath, output, output_prefix, name_style,
|
||||
minx_icon, miny_icon, maxx_icon, maxy_icon,
|
||||
spacex_icon, spacey_icon,
|
||||
):
|
||||
import struct
|
||||
|
||||
is_simple = (max(minx, miny, maxx, maxy,
|
||||
minx_icon, miny_icon, maxx_icon, maxy_icon,
|
||||
@@ -209,7 +208,7 @@ def dice(filepath, output, output_prefix, name_style,
|
||||
|
||||
# simple, no margins
|
||||
if is_simple:
|
||||
sub_x = x * icon_x
|
||||
sub_x = x * icon_w
|
||||
sub_y = y * icon_h
|
||||
else:
|
||||
sub_x = minx + ((x * (icon_w + spacex_icon)) + minx_icon)
|
||||
|
||||
@@ -96,7 +96,7 @@ def test_urls():
|
||||
import rna_wiki_reference
|
||||
|
||||
import urllib.error
|
||||
from urllib.request import urlopen
|
||||
from urllib.request import urlopen
|
||||
|
||||
prefix = rna_wiki_reference.url_manual_prefix
|
||||
urls = {suffix for (rna_id, suffix) in rna_wiki_reference.url_manual_mapping}
|
||||
@@ -118,7 +118,7 @@ def test_urls():
|
||||
print(" %s ... " % url_full, end="")
|
||||
sys.stdout.flush()
|
||||
try:
|
||||
urllib.request.urlopen(url_full)
|
||||
urlopen(url_full)
|
||||
print(color_green + "OK" + color_normal)
|
||||
except urllib.error.HTTPError:
|
||||
print(color_red + "FAIL!" + color_normal)
|
||||
|
||||
@@ -20,15 +20,16 @@
|
||||
|
||||
import os
|
||||
|
||||
# depends on pep8, pyflakes, pylint
|
||||
# depends on pep8, frosted, pylint
|
||||
# for Ubuntu
|
||||
#
|
||||
# sudo apt-get install pylint pyflakes
|
||||
# sudo apt-get install pylint
|
||||
#
|
||||
# sudo apt-get install python-setuptools python-pip
|
||||
# sudo pip install pep8
|
||||
# sudo pip install frosted
|
||||
#
|
||||
# in Debian install pylint pyflakes pep8 with apt-get/aptitude/etc
|
||||
# in Debian install pylint pep8 with apt-get/aptitude/etc
|
||||
#
|
||||
# on *nix run
|
||||
# python source/tests/pep8.py > test_pep8.log 2>&1
|
||||
@@ -118,10 +119,10 @@ def main():
|
||||
|
||||
os.system("pep8 --repeat --ignore=%s '%s'" % (",".join(ignore_tmp), f))
|
||||
|
||||
# pyflakes
|
||||
print("\n\n\n# running pyflakes...")
|
||||
# frosted
|
||||
print("\n\n\n# running frosted...")
|
||||
for f, pep8_type in files:
|
||||
os.system("pyflakes '%s'" % f)
|
||||
os.system("frosted '%s'" % f)
|
||||
|
||||
print("\n\n\n# running pylint...")
|
||||
for f, pep8_type in files:
|
||||
|
||||
@@ -50,7 +50,6 @@ def parse_rst_py(filepath):
|
||||
indent_map = {}
|
||||
indent_prev = 0
|
||||
f = open(filepath, encoding="utf-8")
|
||||
indent_lists = []
|
||||
for i, line in enumerate(f):
|
||||
line_strip = line.lstrip()
|
||||
# ^\.\.\s[a-zA-Z09\-]+::.*$
|
||||
|
||||
Reference in New Issue
Block a user