mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Added full support of the Bot API 9.4 (#1761)
* Bump API schema to version 9.4, add new object types, methods, and properties.
* Add tests for `ChatOwnerChanged` and `ChatOwnerLeft` message types
* Add tests for `GetUserProfileAudios`, `RemoveMyProfilePhoto`, and `SetMyProfilePhoto` methods
* Bump version
* Update Makefile variables and refactor `test_get_user_profile_audios.py`
* Document new features and updates from Bot API 9.4 in changelog
* Add `ButtonStyle` enum to represent button styles in the Telegram API
* Fix review issues from PR #1761
- Remove stray '-' artifact from GameHighScore docstring and butcher schema
- Fix Makefile reformat target scope inconsistency (ruff check --fix)
- Fix ButtonStyle enum source URL (#chat -> #inlinekeyboardbutton)
- Add User.get_profile_audios() shortcut method (parallel to get_profile_photos)
- Test ChatOwnerLeft with new_owner=None (edge case)
- Add VideoQuality type and Video.qualities nesting tests
- Add User.get_profile_audios() test
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Revert "Fix review issues from PR #1761"
This reverts commit 2184e98988.
* Update source links for `ButtonStyle` documentation to reflect accurate API references
* Fix review issues from PR #1761 (#1762)
* Fix review issues from PR #1761
- Remove stray '-' artifact from GameHighScore docstring
- Fix Makefile reformat target scope inconsistency (ruff check --fix)
- Add User.get_profile_audios() shortcut method (parallel to get_profile_photos)
- Test ChatOwnerLeft with new_owner=None (edge case)
- Add VideoQuality type and Video.qualities nesting tests
- Add User.get_profile_audios() test
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Address review comments: use fixture and variables in tests, add changelog
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Address review follow-ups for PR #1762
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* Reformat code
* Shut up, ruff
---------
Co-authored-by: latand <latand666@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Kostiantyn Kriuchkov <36363097+Latand@users.noreply.github.com>
This commit is contained in:
parent
da7bfdca0c
commit
49d0784e33
67 changed files with 1457 additions and 61 deletions
|
|
@ -45,9 +45,9 @@ def bump_version(part: str) -> str:
|
|||
|
||||
|
||||
if __name__ == "__main__":
|
||||
if len(sys.argv) != 2:
|
||||
print("Usage: python scripts/bump_version.py [major|minor|patch|to:X.Y.Z]")
|
||||
if len(sys.argv) != 2: # noqa: PLR2004
|
||||
print("Usage: python scripts/bump_version.py [major|minor|patch|to:X.Y.Z]") # noqa: T201
|
||||
sys.exit(1)
|
||||
|
||||
new_version = bump_version(sys.argv[1])
|
||||
print(f"Bumped version to {new_version}")
|
||||
print(f"Bumped version to {new_version}") # noqa: T201
|
||||
|
|
|
|||
|
|
@ -45,8 +45,7 @@ def get_telegram_api_version() -> str:
|
|||
|
||||
|
||||
def replace_line(content: str, pattern: re.Pattern, new_value: str) -> str:
|
||||
result = pattern.sub(f"\\g<1>{new_value}\\g<2>", content)
|
||||
return result
|
||||
return pattern.sub(f"\\g<1>{new_value}\\g<2>", content)
|
||||
|
||||
|
||||
def write_package_meta(api_version: str) -> None:
|
||||
|
|
@ -55,7 +54,7 @@ def write_package_meta(api_version: str) -> None:
|
|||
|
||||
content = replace_line(content, API_VERSION, api_version)
|
||||
|
||||
print(f"Write {path}")
|
||||
print(f"Write {path}") # noqa: T201
|
||||
path.write_text(content)
|
||||
|
||||
|
||||
|
|
@ -64,7 +63,7 @@ def write_readme(api_version: str) -> None:
|
|||
content = path.read_text()
|
||||
content = replace_line(content, API_VERSION_BADGE, api_version)
|
||||
content = replace_line(content, API_VERSION_LINE, api_version)
|
||||
print(f"Write {path}")
|
||||
print(f"Write {path}") # noqa: T201
|
||||
path.write_text(content)
|
||||
|
||||
|
||||
|
|
@ -72,14 +71,14 @@ def write_docs_index(api_version: str) -> None:
|
|||
path = Path.cwd() / "docs" / "index.rst"
|
||||
content = path.read_text()
|
||||
content = replace_line(content, API_VERSION_BADGE, api_version)
|
||||
print(f"Write {path}")
|
||||
print(f"Write {path}") # noqa: T201
|
||||
path.write_text(content)
|
||||
|
||||
|
||||
def main():
|
||||
api_version = get_telegram_api_version()
|
||||
|
||||
print(f"Telegram Bot API version: {api_version}")
|
||||
print(f"Telegram Bot API version: {api_version}") # noqa: T201
|
||||
write_package_meta(api_version=api_version)
|
||||
write_readme(api_version=api_version)
|
||||
write_docs_index(api_version=api_version)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue