(no changes, but git detects a change)

Signed-off-by: CocoByte <nicolle.leclair@gmail.com>
This commit is contained in:
CocoByte 2023-10-08 20:00:16 -06:00
parent c8a8d0c34a
commit c971d838fe
No known key found for this signature in database
GPG key ID: BBFAA2526384C97F

View file

@ -81,14 +81,16 @@ class Command(BaseCommand):
for testing purposes, but USE WITH CAUTION
"""
parser.add_argument(
"domain_contacts_filename", help="Data file with domain contact information"
"domain_contacts_filename",
help="Data file with domain contact information"
)
parser.add_argument(
"contacts_filename",
help="Data file with contact information",
)
parser.add_argument(
"domain_statuses_filename", help="Data file with domain status information"
"domain_statuses_filename",
help="Data file with domain status information"
)
parser.add_argument("--sep", default="|", help="Delimiter character")
@ -105,9 +107,7 @@ class Command(BaseCommand):
action=argparse.BooleanOptionalAction,
)
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:
@ -129,9 +129,7 @@ class Command(BaseCommand):
"""
)
def get_domain_user_dict(
self, domain_statuses_filename: str, sep: str
) -> defaultdict(str):
def get_domain_user_dict(self, domain_statuses_filename: str, sep: str) -> defaultdict(str):
"""Creates a mapping of domain name -> status"""
domain_status_dictionary = defaultdict(str)
logger.info("Reading domain statuses data file %s", domain_statuses_filename)
@ -165,9 +163,9 @@ class Command(BaseCommand):
and any ok state should map to Ready.
"""
status_maps = {
"hold": TransitionDomain.StatusChoices.HOLD,
"serverhold": TransitionDomain.StatusChoices.HOLD,
"clienthold": TransitionDomain.StatusChoices.HOLD,
"hold": TransitionDomain.StatusChoices.ON_HOLD,
"serverhold": TransitionDomain.StatusChoices.ON_HOLD,
"clienthold": TransitionDomain.StatusChoices.ON_HOLD,
"created": TransitionDomain.StatusChoices.READY,
"ok": TransitionDomain.StatusChoices.READY,
}
@ -177,7 +175,7 @@ class Command(BaseCommand):
self,
duplicate_domain_user_combos: list[TransitionDomain],
duplicate_domains: list[TransitionDomain],
users_without_email: list[str],
users_without_email: list[str]
):
"""Called at the end of the script execution to print out a summary of
data anomalies in the imported Verisign data. Currently, we check for:
@ -219,8 +217,9 @@ class Command(BaseCommand):
{termColors.ENDC}"""
)
def print_summary_status_findings(
self, domains_without_status: list[str], outlier_statuses: list[str]
def print_summary_status_findings(self,
domains_without_status: list[str],
outlier_statuses: list[str]
):
"""Called at the end of the script execution to print out a summary of
status anomolies in the imported Verisign data. Currently, we check for:
@ -265,6 +264,7 @@ class Command(BaseCommand):
{termColors.ENDC}"""
)
def handle( # noqa: C901
self,
domain_contacts_filename,
@ -463,7 +463,7 @@ class Command(BaseCommand):
# DEBUG:
if debug_on or debug_max_entries_to_parse > 0:
if (
total_rows_parsed > debug_max_entries_to_parse
total_rows_parsed >= debug_max_entries_to_parse
and debug_max_entries_to_parse != 0
):
logger.info(