# Path: planb/models.py
# BOGODATE = datetime(1970, 1, 2, tzinfo=timezone.utc)
# class _DecoratedSnapshot:
# class HostGroup(models.Model):
#     class Meta:
# class FilesetLock(object):
# class Fileset(models.Model):
#     class Meta:
# class BackupRun(models.Model):
#     def iterator(cls, sorted_snapshots):
#     def __init__(self, name, prev=None):
#     def diff(self):
#     def rdiff(self):
#     def _human_time(self, secs):
#     def __str__(self):
#     def get_blacklist_hours(self):
#     def get_retention(self):
#     def __str__(self):
#     def __init__(self, fileset_id, timeout=86400):
#     def lock(self):
#     def __enter__(self):
#     def __exit__(self, type, value, traceback):
#     def is_acquired(self):
#     def acquire(self, blocking=None):
#     def release(self):
#     def __str__(self):
#     def unique_name(self):
#     def with_lock(fileset_id):
#     def get_transport(self):
#     def storage(self):
#     def get_blacklist_hours(self):
#     def is_in_blacklist_hours(self):
#     def get_retention(self):
#     def retention_map(self):
#     def hourly_retention(self):
#     def daily_retention(self):
#     def weekly_retention(self):
#     def monthly_retention(self):
#     def yearly_retention(self):
#     def retention_display(self):
#     def total_size(self):
#     def snapshot_size(self):
#     def snapshot_count(self):
#     def snapshot_efficiency(self):
#     def last_backuprun(self):
#     def last_successful_backuprun(self):
#     def get_dataset(self):
#     def rename_dataset(self, new_dataset_name):
#     def clone(self, **override):
#     def should_backup(self):
#     def _has_recent_backup(self):
#     def snapshot_rotate(self):
#     def snapshot_list(self):
#     def snapshot_list_display(self):
#     def has_child_datasets(self):
#     def get_next_snapshot_name(self):
#     def snapshot_create(self):
#     def signal_done(self, success):
#     def save(self, *args, **kwargs):
#     def total_size(self):
#     def snapshot_size(self):
#     def snapshot_size_listing_as_list(self):
#     def __str__(self):
# def create_dataset(sender, instance, created, *args, **kwargs):


import re
from django.conf import settings
from django.core.checks import Critical
from django.core.exceptions import ValidationError
from .models import validate_blacklist_hours, validate_retention



_planb_settings_checks = []
_is_planb_settings_check = (lambda x: _planb_settings_checks.append(x) or x)


def check_planb_settings(app_configs, **kwargs):
    errors = []
    for checkfunc in _planb_settings_checks:
        errors.extend(checkfunc())
    return errors


@_is_planb_settings_check
def _settings__planb_blacklist_hours():
    if settings.PLANB_BLACKLIST_HOURS:
        try:

# Path: planb/models.py
# BOGODATE = datetime(1970, 1, 2, tzinfo=timezone.utc)
# class _DecoratedSnapshot:
# class HostGroup(models.Model):
#     class Meta:
# class FilesetLock(object):
# class Fileset(models.Model):
#     class Meta:
# class BackupRun(models.Model):
#     def iterator(cls, sorted_snapshots):
#     def __init__(self, name, prev=None):
#     def diff(self):
#     def rdiff(self):
#     def _human_time(self, secs):
#     def __str__(self):
#     def get_blacklist_hours(self):
#     def get_retention(self):
#     def __str__(self):
#     def __init__(self, fileset_id, timeout=86400):
#     def lock(self):
#     def __enter__(self):
#     def __exit__(self, type, value, traceback):
#     def is_acquired(self):
#     def acquire(self, blocking=None):
#     def release(self):
#     def __str__(self):
#     def unique_name(self):
#     def with_lock(fileset_id):
#     def get_transport(self):
#     def storage(self):
#     def get_blacklist_hours(self):
#     def is_in_blacklist_hours(self):
#     def get_retention(self):
#     def retention_map(self):
#     def hourly_retention(self):
#     def daily_retention(self):
#     def weekly_retention(self):
#     def monthly_retention(self):
#     def yearly_retention(self):
#     def retention_display(self):
#     def total_size(self):
#     def snapshot_size(self):
#     def snapshot_count(self):
#     def snapshot_efficiency(self):
#     def last_backuprun(self):
#     def last_successful_backuprun(self):
#     def get_dataset(self):
#     def rename_dataset(self, new_dataset_name):
#     def clone(self, **override):
#     def should_backup(self):
#     def _has_recent_backup(self):
#     def snapshot_rotate(self):
#     def snapshot_list(self):
#     def snapshot_list_display(self):
#     def has_child_datasets(self):
#     def get_next_snapshot_name(self):
#     def snapshot_create(self):
#     def signal_done(self, success):
#     def save(self, *args, **kwargs):
#     def total_size(self):
#     def snapshot_size(self):
#     def snapshot_size_listing_as_list(self):
#     def __str__(self):
# def create_dataset(sender, instance, created, *args, **kwargs):


# Path: planb/checks.py
import re
from django.conf import settings
from django.core.checks import Critical
from django.core.exceptions import ValidationError
from .models import validate_blacklist_hours, validate_retention




_planb_settings_checks = []
_is_planb_settings_check = (lambda x: _planb_settings_checks.append(x) or x)


def check_planb_settings(app_configs, **kwargs):
    errors = []
    for checkfunc in _planb_settings_checks:
        errors.extend(checkfunc())
    return errors


@_is_planb_settings_check
def _settings__planb_blacklist_hours():
    if settings.PLANB_BLACKLIST_HOURS:
        try:

            validate_blacklist_hours(settings.PLANB_BLACKLIST_HOURS)