Added linting

This commit is contained in:
Alysia Broddrick 2023-09-11 05:40:31 -07:00
parent 3be7680311
commit 01335ff515
No known key found for this signature in database
GPG key ID: 03917052CD0F06B7
2 changed files with 16 additions and 20 deletions

View file

@ -176,7 +176,6 @@ class DomainAdmin(ListHeaderAdmin):
readonly_fields = ["state"]
def response_change(self, request, obj):
GET_SECURITY_EMAIL = "_get_security_email"
SET_SECURITY_CONTACT = "_set_security_contact"
MAKE_DOMAIN = "_make_domain_in_registry"
@ -187,7 +186,6 @@ class DomainAdmin(ListHeaderAdmin):
REMOVE_CLIENT_HOLD = "_rem_client_hold"
DELETE_DOMAIN = "_delete_domain"
PLACE_HOLD = "_place_client_hold"
EDIT_DOMAIN = "_edit_domain"
if PLACE_HOLD in request.POST:
@ -263,7 +261,6 @@ class DomainAdmin(ListHeaderAdmin):
)
return HttpResponseRedirect(".")
elif MAKE_NAMESERVERS in request.POST:
try:
hosts = [("ns1.example.com", None), ("ns2.example.com", None)]

View file

@ -347,7 +347,6 @@ class Domain(TimeStampedModel, DomainHelper):
# some statuses cannot be set by the client at all
raise NotImplementedError()
@Cache
def registrant_contact(self) -> PublicContact:
"""Get or set the registrant for this domain."""
@ -369,7 +368,6 @@ class Domain(TimeStampedModel, DomainHelper):
@administrative_contact.setter # type: ignore
def administrative_contact(self, contact: PublicContact):
logger.info("making admin contact")
if contact.contact_type != contact.ContactTypeChoices.ADMINISTRATIVE:
raise ValueError(
@ -408,7 +406,9 @@ class Domain(TimeStampedModel, DomainHelper):
# TODO - consider making this use both add and rem at the same time, separating it out may not be needed
# good addition for ticket 850
logger.info("_update_domain_with_contact() received type %s " % contact.contact_type)
logger.info(
"_update_domain_with_contact() received type %s " % contact.contact_type
)
domainContact = epp.DomainContact(
contact=contact.registry_id, type=contact.contact_type
)
@ -522,7 +522,6 @@ class Domain(TimeStampedModel, DomainHelper):
# make contact in registry, duplicate and errors handled there
errorCode = self._make_contact_in_registry(contact)
# contact is already added to the domain, but something may have changed on it
alreadyExistsInRegistry = errorCode == ErrorCode.OBJECT_EXISTS
# if an error occured besides duplication, stop
@ -828,7 +827,8 @@ class Domain(TimeStampedModel, DomainHelper):
)
def ready(self):
"""Transition to the ready state
domain should have nameservers and all contacts and now should be considered live on a domain"""
domain should have nameservers and all contacts and now should be considered live on a domain
"""
# TODO - in nameservers tickets 848 and 562 check here if updates need to be made
nameserverList = self.nameservers
logger.info("Changing to ready state")
@ -1008,7 +1008,6 @@ class Domain(TimeStampedModel, DomainHelper):
{k: v for k, v in contact.items() if v is not ...}
)
# get nameserver info, if there are any
if (
# fetch_hosts and