Skip to content

Commit

Permalink
Fixes for py312
Browse files Browse the repository at this point in the history
  • Loading branch information
vemel committed Nov 10, 2023
1 parent eac5a30 commit 79aa849
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion mypy_boto3_builder/jinja_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def __init__(self) -> None:
self._environment.filters["escape_md"] = self.escape_md # type: ignore
self.update_globals(
builder_version=get_builder_version(),
current_year=str(datetime.datetime.utcnow().year),
current_year=str(datetime.datetime.now(datetime.timezone.utc).year),
get_anchor_link=get_anchor_link,
hasattr=hasattr,
len=len,
Expand Down
4 changes: 2 additions & 2 deletions mypy_boto3_builder/utils/nice_path.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class NicePath(Path):
def __str__(self) -> str:
path = Path(self)
if self.is_absolute():
cwd = self.cwd()
cwd = Path.cwd()
if path == cwd or path.parts <= cwd.parts:
return str(path)

Expand All @@ -43,7 +43,7 @@ def walk(
Existing Path.
"""
exclude_strs = {self.__class__(i).as_posix() for i in exclude}
for path in self.glob(glob_pattern):
for path in Path(self).glob(glob_pattern):
if not path.is_file():
continue

Expand Down

0 comments on commit 79aa849

Please sign in to comment.