From 9402e53b2d689d9260c0bd85fa2a3b9d2ac71d5c Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 1 Feb 2024 13:16:58 -0500 Subject: [PATCH] [pre-commit.ci] pre-commit autoupdate (#304) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 6 +++--- src/roman_datamodels/datamodels/_core.py | 1 + src/roman_datamodels/datamodels/_utils.py | 1 + src/roman_datamodels/stnode/__init__.py | 1 + src/roman_datamodels/stnode/_converters.py | 1 + src/roman_datamodels/stnode/_mixins.py | 1 + src/roman_datamodels/stnode/_node.py | 1 + src/roman_datamodels/stnode/_registry.py | 1 + src/roman_datamodels/stnode/_tagged.py | 1 + 9 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0daac609..747bd942 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -42,7 +42,7 @@ repos: args: ["--py38-plus"] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: 'v0.1.13' + rev: 'v0.1.14' hooks: - id: ruff args: ["--fix"] @@ -53,12 +53,12 @@ repos: - id: isort - repo: https://github.com/psf/black - rev: 23.12.1 + rev: 24.1.1 hooks: - id: black - repo: https://github.com/PyCQA/bandit - rev: 1.7.6 + rev: 1.7.7 hooks: - id: bandit args: ["-r", "-ll"] diff --git a/src/roman_datamodels/datamodels/_core.py b/src/roman_datamodels/datamodels/_core.py index 0cd27761..a95fb875 100644 --- a/src/roman_datamodels/datamodels/_core.py +++ b/src/roman_datamodels/datamodels/_core.py @@ -7,6 +7,7 @@ used for Roman. This dataclass is intended to be subclassed to form all of the actual working datamodels. """ + import abc import copy import datetime diff --git a/src/roman_datamodels/datamodels/_utils.py b/src/roman_datamodels/datamodels/_utils.py index 12d5b15a..559a01fa 100644 --- a/src/roman_datamodels/datamodels/_utils.py +++ b/src/roman_datamodels/datamodels/_utils.py @@ -2,6 +2,7 @@ This module contains the utility functions for the datamodels sub-package. Mainly the open/factory function for creating datamodels """ + import warnings from pathlib import Path diff --git a/src/roman_datamodels/stnode/__init__.py b/src/roman_datamodels/stnode/__init__.py index 1b2c522b..6230ab85 100644 --- a/src/roman_datamodels/stnode/__init__.py +++ b/src/roman_datamodels/stnode/__init__.py @@ -2,6 +2,7 @@ The STNode classes and supporting objects generated dynamically at import time from RAD's manifest. """ + from ._converters import * # noqa: F403 from ._mixins import * # noqa: F403 from ._node import * # noqa: F403 diff --git a/src/roman_datamodels/stnode/_converters.py b/src/roman_datamodels/stnode/_converters.py index 55ecc55e..44694730 100644 --- a/src/roman_datamodels/stnode/_converters.py +++ b/src/roman_datamodels/stnode/_converters.py @@ -1,6 +1,7 @@ """ The ASDF Converters to handle the serialization/deseialization of the STNode classes to ASDF. """ + from asdf.extension import Converter, ManifestExtension from astropy.time import Time diff --git a/src/roman_datamodels/stnode/_mixins.py b/src/roman_datamodels/stnode/_mixins.py index acd97fe0..00f9f0b7 100644 --- a/src/roman_datamodels/stnode/_mixins.py +++ b/src/roman_datamodels/stnode/_mixins.py @@ -1,6 +1,7 @@ """ Mixin classes for additional functionality for STNode classes """ + __all__ = ["WfiModeMixin"] diff --git a/src/roman_datamodels/stnode/_node.py b/src/roman_datamodels/stnode/_node.py index bb4d718c..7703f4d5 100644 --- a/src/roman_datamodels/stnode/_node.py +++ b/src/roman_datamodels/stnode/_node.py @@ -2,6 +2,7 @@ Base node classes for all STNode classes. These are the base classes for the data objects used by the datamodels package. """ + import datetime import re import warnings diff --git a/src/roman_datamodels/stnode/_registry.py b/src/roman_datamodels/stnode/_registry.py index c8306c14..13562e2f 100644 --- a/src/roman_datamodels/stnode/_registry.py +++ b/src/roman_datamodels/stnode/_registry.py @@ -3,6 +3,7 @@ These will be dynamically populated at import time by the subclasses whenever they generated. """ + OBJECT_NODE_CLASSES_BY_TAG = {} LIST_NODE_CLASSES_BY_TAG = {} SCALAR_NODE_CLASSES_BY_TAG = {} diff --git a/src/roman_datamodels/stnode/_tagged.py b/src/roman_datamodels/stnode/_tagged.py index f4bc0186..42027008 100644 --- a/src/roman_datamodels/stnode/_tagged.py +++ b/src/roman_datamodels/stnode/_tagged.py @@ -3,6 +3,7 @@ Each tagged object will be dynamically created at runtime by _stnode.py from RAD's manifest. """ + import copy import asdf