mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-07-04 18:03:07 +02:00
Enable N816: rename mixed-case global variables to snake_case
This commit is contained in:
parent
63a9873343
commit
af162cc321
@ -38,20 +38,20 @@ LEFT_FOLDER_CODE = 100 # Default 100 - 'd'
|
||||
RIGHT_FOLDER_CODE = 97 # Default 97 - 'a'
|
||||
# Change by checking: https://www.ascii-code.com/
|
||||
|
||||
firstFolderName = input("Enter first folder name: [a] ")
|
||||
secondFolderName = input("Enter second folder name: [d] ")
|
||||
first_folder_name = input("Enter first folder name: [a] ")
|
||||
second_folder_name = input("Enter second folder name: [d] ")
|
||||
|
||||
currentPath = os.path.abspath(
|
||||
current_path = os.path.abspath(
|
||||
os.getcwd()
|
||||
) # Stolen from: https://stackoverflow.com/q/3430372
|
||||
os.chdir(currentPath) # Change working directory to the path where the python file is
|
||||
os.chdir(current_path) # Change working directory to the path where the python file is
|
||||
|
||||
if (
|
||||
path.isdir(firstFolderName) != 1
|
||||
path.isdir(first_folder_name) != 1
|
||||
): # Check if folder already exists, if it does not make it
|
||||
os.mkdir(firstFolderName)
|
||||
if path.isdir(secondFolderName) != 1:
|
||||
os.mkdir(secondFolderName)
|
||||
os.mkdir(first_folder_name)
|
||||
if path.isdir(second_folder_name) != 1:
|
||||
os.mkdir(second_folder_name)
|
||||
|
||||
for filename in os.listdir(
|
||||
os.getcwd()
|
||||
@ -67,12 +67,12 @@ for filename in os.listdir(
|
||||
key = cv2.waitKey()
|
||||
if key == RIGHT_FOLDER_CODE:
|
||||
shutil.move(
|
||||
currentPath + "/" + filename,
|
||||
currentPath + "/" + firstFolderName + "/" + filename,
|
||||
current_path + "/" + filename,
|
||||
current_path + "/" + first_folder_name + "/" + filename,
|
||||
)
|
||||
elif key == LEFT_FOLDER_CODE:
|
||||
shutil.move(
|
||||
currentPath + "/" + filename,
|
||||
currentPath + "/" + secondFolderName + "/" + filename,
|
||||
current_path + "/" + filename,
|
||||
current_path + "/" + second_folder_name + "/" + filename,
|
||||
)
|
||||
cv2.destroyAllWindows()
|
||||
|
||||
@ -55,7 +55,6 @@ ignore = [
|
||||
"FBT003", # Boolean positional value - common pattern
|
||||
"ARG001", # Unused function argument - often needed for API compatibility
|
||||
"ARG002", # Unused method argument - often needed for API compatibility
|
||||
"N816", # mixed-case-variable-in-global-scope - often constants
|
||||
"N803", # invalid-argument-name - chess notation uses uppercase
|
||||
"N999", # invalid-module-name - PYTHON folder name
|
||||
"LOG015", # root-logger-call - common in scripts
|
||||
|
||||
Loading…
Reference in New Issue
Block a user