@@ -203,7 +203,7 @@ def remove_prettier_pre_commit():
203
203
204
204
def remove_repo_from_pre_commit_config (repo_to_remove : str ):
205
205
pre_commit_config = Path (".pre-commit-config.yaml" )
206
- content = pre_commit_config .read_text ().splitlines (True )
206
+ content = pre_commit_config .read_text ().splitlines (keepends = True )
207
207
208
208
removing = False
209
209
new_lines = []
@@ -517,7 +517,7 @@ def setup_dependencies():
517
517
if "{{ cookiecutter.use_docker }}" .lower () == "y" :
518
518
# Build the Docker service using Docker Compose
519
519
try :
520
- subprocess .run (["docker" , "compose" , "-f" , "docker-compose.local.yml" , "build" , "django" ], check = True )
520
+ subprocess .run (["docker" , "compose" , "-f" , "docker-compose.local.yml" , "build" , "django" ], check = True ) # noqa: S607
521
521
except subprocess .CalledProcessError as e :
522
522
print (f"Error building Docker service: { e } " , file = sys .stderr )
523
523
sys .exit (1 )
@@ -530,23 +530,23 @@ def setup_dependencies():
530
530
531
531
# Install production dependencies
532
532
try :
533
- subprocess .run (uv_cmd + [ "add" , "--no-sync" , "-r" , "requirements/production.txt" ], check = True )
533
+ subprocess .run ([ * uv_cmd , "add" , "--no-sync" , "-r" , "requirements/production.txt" ], check = True ) # noqa: S603
534
534
except subprocess .CalledProcessError as e :
535
535
print (f"Error installing production dependencies: { e } " , file = sys .stderr )
536
536
sys .exit (1 )
537
537
538
538
# Install local (development) dependencies
539
539
try :
540
- subprocess .run (uv_cmd + [ "add" , "--no-sync" , "--dev" , "-r" , "requirements/local.txt" ], check = True )
540
+ subprocess .run ([ * uv_cmd , "add" , "--no-sync" , "--dev" , "-r" , "requirements/local.txt" ], check = True ) # noqa: S603
541
541
except subprocess .CalledProcessError as e :
542
542
print (f"Error installing local dependencies: { e } " , file = sys .stderr )
543
543
sys .exit (1 )
544
544
545
545
# Remove the requirements directory
546
- if os .path .exists ("requirements" ):
546
+ if os .path .exists ("requirements" ): # noqa: PTH110
547
547
try :
548
548
shutil .rmtree ("requirements" )
549
- except Exception as e :
549
+ except Exception as e : # noqa: BLE001
550
550
print (f"Error removing 'requirements' folder: { e } " , file = sys .stderr )
551
551
sys .exit (1 )
552
552
0 commit comments