Skip to content

Bump black from 23.7.0 to 24.3.0 #154

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changes/154.security
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Updated `black` dependency to `24.3.0` due to CVE-2024-21503.
1 change: 1 addition & 0 deletions development/app_config_schema.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""App Config Schema Generator and Validator."""

import json
from importlib import import_module
from os import getenv
Expand Down
1 change: 1 addition & 0 deletions development/nautobot_config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Nautobot development configuration file."""

import os
import sys

Expand Down
1 change: 1 addition & 0 deletions nautobot_data_validation_engine/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""App declaration for nautobot_data_validation_engine."""

# Metadata is inherited from Nautobot. If not including Nautobot in the environment, this should be added
from importlib import metadata

Expand Down
1 change: 1 addition & 0 deletions nautobot_data_validation_engine/custom_validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
A common clean method for all these classes looks for any
validation rules that have been defined for the given model.
"""

import re
import logging
import inspect
Expand Down
1 change: 1 addition & 0 deletions nautobot_data_validation_engine/datasources.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Datasource definitions."""

from nautobot.extras.choices import LogLevelChoices
from nautobot.extras.registry import DatasourceContent
from nautobot_data_validation_engine.custom_validators import get_classes_from_git_repo
Expand Down
1 change: 1 addition & 0 deletions nautobot_data_validation_engine/template_content.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Template content for nautobot_data_validation_engine."""

from django.urls import reverse
from nautobot.extras.plugins import TemplateExtension

Expand Down
1 change: 1 addition & 0 deletions nautobot_data_validation_engine/tests/test_api.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
API test cases
"""

from django.contrib.contenttypes.models import ContentType
from django.urls import reverse

Expand Down
1 change: 1 addition & 0 deletions nautobot_data_validation_engine/tests/test_basic.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Basic tests that do not require Django."""

import unittest
import os
import toml
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Model test cases
"""

from django.contrib.contenttypes.models import ContentType
from django.core.exceptions import ValidationError
from django.test import TestCase
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""DataComplianceRule test cases."""

from django.test import TestCase
from nautobot.dcim.models import Location, LocationType
from nautobot.extras.models import Status
Expand Down
1 change: 1 addition & 0 deletions nautobot_data_validation_engine/tests/test_filters.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Filterset test cases
"""

from django.contrib.contenttypes.models import ContentType

from nautobot.core.testing.filters import FilterTestCases
Expand Down
1 change: 1 addition & 0 deletions nautobot_data_validation_engine/tests/test_models.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Model test cases
"""

from django.contrib.contenttypes.models import ContentType
from django.core.validators import ValidationError
from django.db.utils import IntegrityError
Expand Down
50 changes: 25 additions & 25 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,9 +519,11 @@ def import_db(context, db_name="", input_file="dump.sql"):
'--execute="',
f"DROP DATABASE IF EXISTS {db_name};",
f"CREATE DATABASE {db_name};",
""
if db_name == "$MYSQL_DATABASE"
else f"GRANT ALL PRIVILEGES ON {db_name}.* TO $MYSQL_USER; FLUSH PRIVILEGES;",
(
""
if db_name == "$MYSQL_DATABASE"
else f"GRANT ALL PRIVILEGES ON {db_name}.* TO $MYSQL_USER; FLUSH PRIVILEGES;"
),
'"',
"&&",
"mysql",
Expand Down