mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-31 15:06:32 +02:00
Black linting
This commit is contained in:
parent
cfaafb8ef3
commit
8aa840f427
10 changed files with 73 additions and 234 deletions
|
@ -193,9 +193,7 @@ class TerminalHelper:
|
|||
return total_line
|
||||
|
||||
@staticmethod
|
||||
def print_to_file_conditional(
|
||||
print_condition: bool, filename: str, file_directory: str, file_contents: str
|
||||
):
|
||||
def print_to_file_conditional(print_condition: bool, filename: str, file_directory: str, file_contents: str):
|
||||
"""Sometimes logger outputs get insanely huge."""
|
||||
if print_condition:
|
||||
# Add a slash if the last character isn't one
|
||||
|
@ -204,10 +202,6 @@ class TerminalHelper:
|
|||
# Assemble filepath
|
||||
filepath = f"{file_directory}{filename}.txt"
|
||||
# Write to file
|
||||
logger.info(
|
||||
f"{TerminalColors.MAGENTA}Writing to file "
|
||||
f" {filepath}..."
|
||||
f"{TerminalColors.ENDC}"
|
||||
)
|
||||
logger.info(f"{TerminalColors.MAGENTA}Writing to file " f" {filepath}..." f"{TerminalColors.ENDC}")
|
||||
with open(f"{filepath}", "w+") as f:
|
||||
f.write(file_contents)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue