mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-29 08:50:01 +02:00
Fix linting failures
This commit is contained in:
parent
53906d339f
commit
b425a45ef2
4 changed files with 15 additions and 4 deletions
|
@ -27,3 +27,4 @@ flake8 = "*"
|
||||||
mypy = "*"
|
mypy = "*"
|
||||||
types-requests = "*"
|
types-requests = "*"
|
||||||
django-stubs = "*"
|
django-stubs = "*"
|
||||||
|
types-cachetools = "*"
|
||||||
|
|
12
src/Pipfile.lock
generated
12
src/Pipfile.lock
generated
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"_meta": {
|
"_meta": {
|
||||||
"hash": {
|
"hash": {
|
||||||
"sha256": "f316f6de355ca582eb3b6d06157714c1bd0cb9edfb03e9499889cd912fddd656"
|
"sha256": "c26e60781d5da15edf636481c9a18506899f824283e8da44e0edf357d29a62cc"
|
||||||
},
|
},
|
||||||
"pipfile-spec": 6,
|
"pipfile-spec": 6,
|
||||||
"requires": {},
|
"requires": {},
|
||||||
|
@ -830,9 +830,17 @@
|
||||||
"sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc",
|
"sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc",
|
||||||
"sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"
|
"sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"
|
||||||
],
|
],
|
||||||
"markers": "python_full_version < '3.11.0a7'",
|
"markers": "python_version >= '3.7'",
|
||||||
"version": "==2.0.1"
|
"version": "==2.0.1"
|
||||||
},
|
},
|
||||||
|
"types-cachetools": {
|
||||||
|
"hashes": [
|
||||||
|
"sha256:069cfc825697cd51445c1feabbe4edc1fae2b2315870e7a9a179a7c4a5851bee",
|
||||||
|
"sha256:b496b7e364ba050c4eaadcc6582f2c9fbb04f8ee7141eb3b311a8589dbd4506a"
|
||||||
|
],
|
||||||
|
"index": "pypi",
|
||||||
|
"version": "==5.2.1"
|
||||||
|
},
|
||||||
"types-pytz": {
|
"types-pytz": {
|
||||||
"hashes": [
|
"hashes": [
|
||||||
"sha256:0c163b15d3e598e6cc7074a99ca9ec72b25dc1b446acc133b827667af0b7b09a",
|
"sha256:0c163b15d3e598e6cc7074a99ca9ec72b25dc1b446acc133b827667af0b7b09a",
|
||||||
|
|
|
@ -7,6 +7,7 @@ from django.test import TestCase, RequestFactory
|
||||||
|
|
||||||
from ..views import available, _domains, in_domains
|
from ..views import available, _domains, in_domains
|
||||||
|
|
||||||
|
|
||||||
class AvailableViewTest(TestCase):
|
class AvailableViewTest(TestCase):
|
||||||
|
|
||||||
"""Test that the view function works as expected."""
|
"""Test that the view function works as expected."""
|
||||||
|
|
|
@ -10,7 +10,9 @@ import requests
|
||||||
|
|
||||||
from cachetools.func import ttl_cache
|
from cachetools.func import ttl_cache
|
||||||
|
|
||||||
DOMAIN_FILE_URL = "https://raw.githubusercontent.com/cisagov/dotgov-data/main/current-full.csv"
|
DOMAIN_FILE_URL = (
|
||||||
|
"https://raw.githubusercontent.com/cisagov/dotgov-data/main/current-full.csv"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
# this file doesn't change that often, nor is it that big, so cache the result
|
# this file doesn't change that often, nor is it that big, so cache the result
|
||||||
|
@ -52,4 +54,3 @@ def available(request, domain=""):
|
||||||
"""
|
"""
|
||||||
# a domain is available if it is NOT in the list of current domains
|
# a domain is available if it is NOT in the list of current domains
|
||||||
return JsonResponse({"available": not in_domains(domain)})
|
return JsonResponse({"available": not in_domains(domain)})
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue