File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 4
4
repo_name = '{{cookiecutter.repo_name }}'
5
5
6
6
def set_python_version ():
7
- python_version = str (sys .version_info .major ) + "." + str (sys .version_info .minor )
7
+ python_version = f" { str (sys .version_info .major )} . { str (sys .version_info .minor )} "
8
8
9
9
file_names = ["Dockerfile" , "Pipfile" , ".github/workflows/test.yml" ]
10
10
for file_name in file_names :
@@ -16,8 +16,8 @@ def set_python_version():
16
16
17
17
def remove_main_if_lib ():
18
18
is_lib = '{{ cookiecutter.binary }}'
19
- main_file_path = os . path . join ( repo_name , '__main__.py' )
20
- if not ( is_lib == "y" or is_lib == "Y" ):
19
+ if is_lib not in { "y" , "Y" }:
20
+ main_file_path = os . path . join ( repo_name , '__main__.py' )
21
21
os .remove (main_file_path )
22
22
23
23
SUCCESS = "\x1b [1;32m"
@@ -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