Skip to content

Commit a327273

Browse files
committed
sty: pacify ruff
1 parent 1b2c43d commit a327273

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

templateflow/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@
2222
#
2323
"""TemplateFlow is the Zone of Templates."""
2424
from datetime import datetime as _dt
25+
from datetime import timezone as _tz
2526

2627
__packagename__ = 'templateflow'
27-
__copyright__ = f'{_dt.now().year} The NiPreps Developers'
28+
__copyright__ = f'{_dt.now(tz=_tz.utc).year} The NiPreps Developers'
2829
try:
2930
from ._version import __version__
3031
except ModuleNotFoundError:

templateflow/_loader.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
from functools import cached_property
3333
from pathlib import Path
3434
from types import ModuleType
35-
from typing import Union
3635

3736
try:
3837
from functools import cache
@@ -124,7 +123,7 @@ class Loader:
124123
.. automethod:: cached
125124
"""
126125

127-
def __init__(self, anchor: Union[str, ModuleType]):
126+
def __init__(self, anchor: str | ModuleType):
128127
self._anchor = anchor
129128
self.files = files(anchor)
130129
self.exit_stack = ExitStack()
@@ -177,7 +176,7 @@ def as_path(self, *segments) -> AbstractContextManager[Path]:
177176
"""
178177
return as_file(self.files.joinpath(*segments))
179178

180-
@cache
179+
@cache # noqa: B019
181180
def cached(self, *segments) -> Path:
182181
"""Ensure data is available as a :class:`~pathlib.Path`.
183182

0 commit comments

Comments
 (0)