mirror of
https://hub.njuu.cf/TheAlgorithms/Python.git
synced 2023-10-11 13:06:12 +08:00
Update ~script.py (#990)
Changing the boolean expression avoids the use of a continue statement. This way the code becomes easier/faster to compute on lower level and it has a better coding style.
This commit is contained in:
parent
c2f2fa8b23
commit
f2eb965604
@ -20,8 +20,7 @@ def _markdown(parent, ignores, ignores_ext, depth):
|
|||||||
for i in os.listdir(parent):
|
for i in os.listdir(parent):
|
||||||
full = os.path.join(parent, i)
|
full = os.path.join(parent, i)
|
||||||
name, ext = os.path.splitext(i)
|
name, ext = os.path.splitext(i)
|
||||||
if i in ignores or ext in ignores_ext:
|
if i not in ignores and ext not in ignores_ext:
|
||||||
continue
|
|
||||||
if os.path.isfile(full):
|
if os.path.isfile(full):
|
||||||
# generate list
|
# generate list
|
||||||
pre = parent.replace("./", "").replace(" ", "%20")
|
pre = parent.replace("./", "").replace(" ", "%20")
|
||||||
|
Loading…
Reference in New Issue
Block a user