Skip to content

Commit 8d5718d

Browse files
authored
Fix check version in changelog script (#164)
1 parent 9744ace commit 8d5718d

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

scripts/check_version_in_changelog.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@
1515

1616
with open(CHANGELOG_PATH, encoding='utf-8') as changelog_file:
1717
for line in changelog_file:
18-
# The heading for the changelog entry for the given version can start with either the version number, or the version number in a link
19-
if re.match(rf'\[?{current_package_version}([\] ]|$)', line):
18+
# Ensure that the heading in the changelog entry for the specified version includes a version number
19+
# enclosed in square brackets. This version number is formatted as a link to the corresponding
20+
# version tag on GitHub.
21+
if re.match(rf'## \[{current_package_version}\].*$', line):
2022
break
2123
else:
2224
raise RuntimeError(f'There is no entry in the changelog for the current package version ({current_package_version})')

src/apify_client/_logging.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class LogContext(NamedTuple):
3939
# Metaclass for resource clients which wraps all their public methods
4040
# With injection of their details to the log context vars
4141
class WithLogDetailsClient(type):
42-
def __new__(cls: type[type], name: str, bases: tuple, attrs: dict) -> WithLogDetailsClient: # noqa: PYI034
42+
def __new__(cls: type[type], name: str, bases: tuple, attrs: dict) -> WithLogDetailsClient:
4343
for attr_name, attr_value in attrs.items():
4444
if not attr_name.startswith('_') and inspect.isfunction(attr_value):
4545
attrs[attr_name] = _injects_client_details_to_log_context(attr_value)

0 commit comments

Comments
 (0)