File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 3
3
4
4
5
5
def set_python_version ():
6
- python_version = str (sys .version_info .major ) + "." + str (sys .version_info .minor )
6
+ python_version = f" { str (sys .version_info .major )} . { str (sys .version_info .minor )} "
7
7
8
8
file_names = ["Dockerfile" , "Pipfile" , ".github/workflows/test.yml" ]
9
9
for file_name in file_names :
@@ -15,8 +15,8 @@ def set_python_version():
15
15
16
16
def remove_main_if_lib ():
17
17
is_lib = '{{ cookiecutter.binary }}'
18
- main_file_path = os . path . join ( '{{ cookiecutter.repo_name }}' , '__main__.py' )
19
- if not ( is_lib == "y" or is_lib == "Y" ):
18
+ if is_lib not in { "y" , "Y" }:
19
+ main_file_path = os . path . join ( '{{ cookiecutter.repo_name }}' , '__main__.py' )
20
20
os .remove (main_file_path )
21
21
print (main_file_path )
22
22
@@ -28,7 +28,7 @@ def remove_main_if_lib():
28
28
def main ():
29
29
set_python_version ()
30
30
remove_main_if_lib ()
31
- print (SUCCESS + " Project successfully initialized" + TERMINATOR )
31
+ print (f" { SUCCESS } Project successfully initialized{ TERMINATOR } " )
32
32
33
33
34
34
if __name__ == "__main__" :
You can’t perform that action at this time.
0 commit comments