Skip to content

Commit

Permalink
Update dev dependencies (#3751)
Browse files Browse the repository at this point in the history
* updaet dev dependencies

* lint

* lint

* unlint

* lint
  • Loading branch information
timoballard committed Apr 25, 2024
1 parent 85f283a commit aba8a48
Show file tree
Hide file tree
Showing 31 changed files with 215 additions and 180 deletions.
1 change: 1 addition & 0 deletions backend/audit/cross_validation/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
]
"""

from .additional_ueis import additional_ueis
from .auditee_ueis_match import auditee_ueis_match
from .check_certifying_contacts import check_certifying_contacts
Expand Down
12 changes: 9 additions & 3 deletions backend/audit/cross_validation/naming.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,19 @@ class SectionBabelFish(NamedTuple):
camel_case: str # Mostly used in JSON Schemas.
friendly: str # The name we show to users.
friendly_title: str # The title on the submission progress page/form page.
reverse_url_for_file_upload: str | None # Django value for finding the actual URL for upload.
reverse_url_for_file_deletion: str | None # Django value for finding the actual URL for deletion.
reverse_url_for_file_upload: (
str | None
) # Django value for finding the actual URL for upload.
reverse_url_for_file_deletion: (
str | None
) # Django value for finding the actual URL for deletion.
snake_case: str # Mostly used for the field names in SingleAuditChecklist.
url_tail: str | None # Hyphenated version of snake_case, mostly.
workbook_number: int | None # Our upload ordering of workbooks.
submission_event: str # The event type we log to the SubmissionEvents table when this section is updated
deletion_event: str | None # The event type we log to the SubmissionEvents table when this section is deleted
deletion_event: (
str | None
) # The event type we log to the SubmissionEvents table when this section is deleted


SECTION_NAMES = {
Expand Down
14 changes: 8 additions & 6 deletions backend/audit/cross_validation/test_check_award_ref_existence.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,14 @@ def _make_federal_awards(self, award_refs) -> dict:
return {
"FederalAwards": {
"federal_awards": [
{
"program": {"federal_agency_prefix": "10"},
"award_reference": award_ref,
}
if award_ref
else {"program": {"federal_agency_prefix": "22"}}
(
{
"program": {"federal_agency_prefix": "10"},
"award_reference": award_ref,
}
if award_ref
else {"program": {"federal_agency_prefix": "22"}}
)
for award_ref in award_refs
],
}
Expand Down
1 change: 1 addition & 0 deletions backend/audit/fixtures/excel.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Fixtures for use with Excel spreadsheet handling.
"""

from collections import namedtuple
from django.conf import settings

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
before by hacking an override into the SingleAuditChecklist.save method but since
removed it.
"""

import calendar
import logging
import time
Expand Down
1 change: 1 addition & 0 deletions backend/audit/models/access_roles.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Keeping this in a separate file allows us to re-use the same list in both Access and
DeletedAccess without running into circular import problems.
"""

from django.utils.translation import gettext_lazy as _

ACCESS_ROLES = (
Expand Down
1 change: 1 addition & 0 deletions backend/audit/templatetags/sprite_helper.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Custom tag to support simpler writing of USWDS sprite icon references.
"""

from django import template

register = template.Library()
Expand Down
1 change: 1 addition & 0 deletions backend/audit/templatetags/submission_progress_tags.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Custom tag to support the logic around sections on the Submission progress page.
"""

from django import template

register = template.Library()
Expand Down
6 changes: 3 additions & 3 deletions backend/audit/test_intake_to_dissemination.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,9 +368,9 @@ def _fake_audit_information():
"gaap_results": json.dumps([fake.word()]),
"is_going_concern_included": "Y" if fake.boolean() else "N",
"is_internal_control_deficiency_disclosed": "Y" if fake.boolean() else "N",
"is_internal_control_material_weakness_disclosed": "Y"
if fake.boolean()
else "N",
"is_internal_control_material_weakness_disclosed": (
"Y" if fake.boolean() else "N"
),
"is_material_noncompliance_disclosed": "Y" if fake.boolean() else "N",
"is_aicpa_audit_guide_included": "Y" if fake.boolean() else "N",
"is_low_risk_auditee": "Y" if fake.boolean() else "N",
Expand Down
6 changes: 3 additions & 3 deletions backend/audit/test_validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -932,9 +932,9 @@ def test_error_raised_for_wrong_value_types(self):
"""Test that wrong value types raise a validation error."""
for case in self.SIMPLE_CASES:
case_copy = jsoncopy(case)
case_copy[
"is_tribal_information_authorized_to_be_public"
] = "incorrect_type"
case_copy["is_tribal_information_authorized_to_be_public"] = (
"incorrect_type"
)

with self.assertRaises(ValidationError):
validate_tribal_data_consent_json(case_copy)
Expand Down
6 changes: 3 additions & 3 deletions backend/audit/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,9 @@ def _fake_audit_information():
"gaap_results": json.dumps([fake.word()]),
"is_going_concern_included": "Y" if fake.boolean() else "N",
"is_internal_control_deficiency_disclosed": "Y" if fake.boolean() else "N",
"is_internal_control_material_weakness_disclosed": "Y"
if fake.boolean()
else "N",
"is_internal_control_material_weakness_disclosed": (
"Y" if fake.boolean() else "N"
),
"is_material_noncompliance_disclosed": "Y" if fake.boolean() else "N",
"is_aicpa_audit_guide_included": "Y" if fake.boolean() else "N",
"is_low_risk_auditee": "Y" if fake.boolean() else "N",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,12 +213,10 @@ def xform_auditee_fiscal_period_end(general_information):
"""Transforms the fiscal period end from Census format to FAC format."""
# Transformation to be documented.
if general_information.get("auditee_fiscal_period_end"):
general_information[
"auditee_fiscal_period_end"
] = xform_census_date_to_datetime(
general_information.get("auditee_fiscal_period_end")
).strftime(
"%Y-%m-%d"
general_information["auditee_fiscal_period_end"] = (
xform_census_date_to_datetime(
general_information.get("auditee_fiscal_period_end")
).strftime("%Y-%m-%d")
)
else:
raise DataMigrationError(
Expand Down
12 changes: 8 additions & 4 deletions backend/census_historical_migration/workbooklib/findings.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,14 @@ def _get_findings_grid(findings_list):
]

return [
"Y"
if "".join((getattr(finding, attr, "") or "").strip() for attr in attributes)
in allowed_combos
else "N"
(
"Y"
if "".join(
(getattr(finding, attr, "") or "").strip() for attr in attributes
)
in allowed_combos
else "N"
)
for finding in findings_list
]

Expand Down
1 change: 1 addition & 0 deletions backend/config/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
For the full list of settings and their values, see
https://docs.djangoproject.com/en/4.0/ref/settings/
"""

from base64 import b64decode
import os
import sys
Expand Down
1 change: 1 addition & 0 deletions backend/data_distro/management/commands/handle_errors.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Functions that the public data loader uses to handle errors"""

import logging
import json
import os
Expand Down
1 change: 1 addition & 0 deletions backend/data_distro/management/commands/link_data.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Functions that the public data loader uses to build relationships between models """

import traceback

from data_distro import models as mods
Expand Down
1 change: 1 addition & 0 deletions backend/data_distro/management/commands/process_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Functions that the public data loader uses to process and transform data.
These functions look at one row of data at a time and save results.
"""

import re
import traceback
from dateutil import parser # type: ignore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
Load them with: manage.py public_data_loader
"""

from django.core.management.base import BaseCommand

from data_distro.management.commands.load_files import (
Expand Down
1 change: 1 addition & 0 deletions backend/data_distro/mappings/upload_mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Used by public_data_loader.
Update with create_upload_mapping management command.
"""

upload_mapping = {
"gen": {
"AUDITEECERTIFYNAME": ["Auditee", "auditee_certify_name"],
Expand Down
1 change: 1 addition & 0 deletions backend/data_distro/migrations/0004_add_new_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
- Format help text to make it more readable
- Adding some metadata
"""

# Generated by Django 4.1.4 on 2023-01-25 15:53


Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
In the last migration we added the fields we were moving to their new classes. This deletes the old fields that are no longer needed.
"""

# Generated by Django 4.1.4 on 2023-01-26 11:32

from django.db import migrations, models
Expand Down
1 change: 1 addition & 0 deletions backend/data_distro/migrations/0032_update_API.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"""

from io import StringIO

from django.db import migrations
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"""

from io import StringIO

from django.db import migrations
Expand Down
Loading

0 comments on commit aba8a48

Please sign in to comment.