Black linting

This commit is contained in:
zandercymatics 2023-11-13 08:31:20 -07:00
parent cfaafb8ef3
commit 8aa840f427
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7
10 changed files with 73 additions and 234 deletions

View file

@ -45,10 +45,7 @@ class Command(BaseCommand):
"""
parser.add_argument(
"migration_json_filename",
help=(
"A JSON file that holds the location and filenames"
"of all the data files used for migrations"
),
help=("A JSON file that holds the location and filenames" "of all the data files used for migrations"),
)
parser.add_argument("--sep", default="|", help="Delimiter character")
@ -73,9 +70,7 @@ class Command(BaseCommand):
"Recommended to be enabled only in a development or testing setting.",
)
parser.add_argument(
"--directory", default="migrationdata", help="Desired directory"
)
parser.add_argument("--directory", default="migrationdata", help="Desired directory")
parser.add_argument(
"--domain_contacts_filename",
help="Data file with domain contact information",
@ -119,9 +114,7 @@ class Command(BaseCommand):
help="Defines the filename for domain type adhocs",
)
def print_debug_mode_statements(
self, debug_on: bool, debug_max_entries_to_parse: int
):
def print_debug_mode_statements(self, debug_on: bool, debug_max_entries_to_parse: int):
"""Prints additional terminal statements to indicate if --debug
or --limitParse are in use"""
if debug_on:
@ -356,42 +349,31 @@ class Command(BaseCommand):
debug_on = args.debug
# Get --LimitParse argument
debug_max_entries_to_parse = int(
args.limitParse
) # set to 0 to parse all entries
debug_max_entries_to_parse = int(args.limitParse) # set to 0 to parse all entries
# Variables for Additional TransitionDomain Information #
# Main script filenames - these do not have defaults
domain_contacts_filename = None
try:
domain_contacts_filename = directory + options.get(
"domain_contacts_filename"
)
domain_contacts_filename = directory + options.get("domain_contacts_filename")
except TypeError:
logger.error(
f"Invalid filename of '{args.domain_contacts_filename}'"
" was provided for domain_contacts_filename"
f"Invalid filename of '{args.domain_contacts_filename}'" " was provided for domain_contacts_filename"
)
contacts_filename = None
try:
contacts_filename = directory + options.get("contacts_filename")
except TypeError:
logger.error(
f"Invalid filename of '{args.contacts_filename}'"
" was provided for contacts_filename"
)
logger.error(f"Invalid filename of '{args.contacts_filename}'" " was provided for contacts_filename")
domain_statuses_filename = None
try:
domain_statuses_filename = directory + options.get(
"domain_statuses_filename"
)
domain_statuses_filename = directory + options.get("domain_statuses_filename")
except TypeError:
logger.error(
f"Invalid filename of '{args.domain_statuses_filename}'"
" was provided for domain_statuses_filename"
f"Invalid filename of '{args.domain_statuses_filename}'" " was provided for domain_statuses_filename"
)
# Agency information
@ -630,9 +612,7 @@ class Command(BaseCommand):
# Print a summary of findings (duplicate entries,
# missing data..etc.)
self.print_summary_duplications(
duplicate_domain_user_combos, duplicate_domains, users_without_email
)
self.print_summary_duplications(duplicate_domain_user_combos, duplicate_domains, users_without_email)
self.print_summary_status_findings(domains_without_status, outlier_statuses)
logger.info(