Skip to main content
Code Review

Return to Answer

Commonmark migration
Source Link

##Duplicated code:

Duplicated code:

if not fname == "": 
 folderPath.delete(0, END) ## This is to erase anything in the "browse" bar
 folderPath.insert(0, fname) ## and use what has been selected from the selection window
else: 
 folderPath.insert(0, fname)

You have folderPath.insert(0, fname) in both the if and the else, at the end of each. Remove duplicated code like this and place it after the if/else:

if not fname == "": 
 folderPath.delete(0, END) ## This is to erase anything in the "browse" bar
 
folderPath.insert(0, fname)

##PEP8

PEP8

Your code does not follow PEP8 standards. This is the recommended style guideline for Python, and most Python programmers follow it.


##Naming:

Naming:

d is not a descriptive variable name (def makedirs(d):), not is f (with open(filename,'w') as f:). You use good names in most other places, so please be consistent.


##Comparison to Boolean Literals:

Comparison to Boolean Literals:

You do not need to compare a value to False or True: if said_it == False:. Just use if not said_if:. Again, you do this in other places in your code.

##Addition:

Addition:

count = count+1 can be count += 1.

##Duplicated code:

if not fname == "": 
 folderPath.delete(0, END) ## This is to erase anything in the "browse" bar
 folderPath.insert(0, fname) ## and use what has been selected from the selection window
else: 
 folderPath.insert(0, fname)

You have folderPath.insert(0, fname) in both the if and the else, at the end of each. Remove duplicated code like this and place it after the if/else:

if not fname == "": 
 folderPath.delete(0, END) ## This is to erase anything in the "browse" bar
 
folderPath.insert(0, fname)

##PEP8

Your code does not follow PEP8 standards. This is the recommended style guideline for Python, and most Python programmers follow it.


##Naming:

d is not a descriptive variable name (def makedirs(d):), not is f (with open(filename,'w') as f:). You use good names in most other places, so please be consistent.


##Comparison to Boolean Literals:

You do not need to compare a value to False or True: if said_it == False:. Just use if not said_if:. Again, you do this in other places in your code.

##Addition:

count = count+1 can be count += 1.

Duplicated code:

if not fname == "": 
 folderPath.delete(0, END) ## This is to erase anything in the "browse" bar
 folderPath.insert(0, fname) ## and use what has been selected from the selection window
else: 
 folderPath.insert(0, fname)

You have folderPath.insert(0, fname) in both the if and the else, at the end of each. Remove duplicated code like this and place it after the if/else:

if not fname == "": 
 folderPath.delete(0, END) ## This is to erase anything in the "browse" bar
 
folderPath.insert(0, fname)

PEP8

Your code does not follow PEP8 standards. This is the recommended style guideline for Python, and most Python programmers follow it.


Naming:

d is not a descriptive variable name (def makedirs(d):), not is f (with open(filename,'w') as f:). You use good names in most other places, so please be consistent.


Comparison to Boolean Literals:

You do not need to compare a value to False or True: if said_it == False:. Just use if not said_if:. Again, you do this in other places in your code.

Addition:

count = count+1 can be count += 1.

Source Link
user34073
user34073

##Duplicated code:

if not fname == "": 
 folderPath.delete(0, END) ## This is to erase anything in the "browse" bar
 folderPath.insert(0, fname) ## and use what has been selected from the selection window
else: 
 folderPath.insert(0, fname)

You have folderPath.insert(0, fname) in both the if and the else, at the end of each. Remove duplicated code like this and place it after the if/else:

if not fname == "": 
 folderPath.delete(0, END) ## This is to erase anything in the "browse" bar
 
folderPath.insert(0, fname)

##PEP8

Your code does not follow PEP8 standards. This is the recommended style guideline for Python, and most Python programmers follow it.


##Naming:

d is not a descriptive variable name (def makedirs(d):), not is f (with open(filename,'w') as f:). You use good names in most other places, so please be consistent.


##Comparison to Boolean Literals:

You do not need to compare a value to False or True: if said_it == False:. Just use if not said_if:. Again, you do this in other places in your code.

##Addition:

count = count+1 can be count += 1.

lang-py

AltStyle によって変換されたページ (->オリジナル) /