Skip to content

Commit

Permalink
Merge pull request #41 from lsst-sitcom/tickets/DM-44685
Browse files Browse the repository at this point in the history
DM-44685: Fix type error
  • Loading branch information
mfisherlevine authored Jun 5, 2024
2 parents 65ed0d9 + c17a787 commit 3943064
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/lsst/summit/extras/logUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def _getFailDataRefs(self) -> list[dafButler.DatasetRef]:
fails.append(dataRef)
return fails

def _printLineIf(self, logLine: dafButler.ButlerLogRecord) -> None:
def _printLineIf(self, logLine: dafButler.logging.ButlerLogRecord) -> None:
"""Print the line if the name of the logger isn't in IGNORE_LOGS_FROM.
Parameters
Expand All @@ -225,7 +225,7 @@ def _printLineIf(self, logLine: dafButler.ButlerLogRecord) -> None:
self._printFormattedLine(logLine)

@staticmethod
def _printFormattedLine(logLine: dafButler.ButlerLogRecord) -> None:
def _printFormattedLine(logLine: dafButler.logging.ButlerLogRecord) -> None:
"""Print the line, formatted as it would be for a normal task.
Parameters
Expand Down
40 changes: 40 additions & 0 deletions tests/test_logUtils.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# This file is part of summit_extras.
#
# Developed for the LSST Data Management System.
# This product includes software developed by the LSST Project
# (https://www.lsst.org).
# See the COPYRIGHT file at the top-level directory of this distribution
# for details of code ownership.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.

import unittest

import lsst.utils.tests

# for now, just check that the import isn't broken until we have some test logs
from lsst.summit.extras.logUtils import LogBrowser # noqa: F401


class TestMemory(lsst.utils.tests.MemoryTestCase):
pass


def setup_module(module):
lsst.utils.tests.init()


if __name__ == "__main__":
lsst.utils.tests.init()
unittest.main()

0 comments on commit 3943064

Please sign in to comment.