-
Notifications
You must be signed in to change notification settings - Fork 46
Dev/2.2.0 #64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Dev/2.2.0 #64
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
bb8a3f0
feat: add join_channel method and update read_message signature to ac…
ink-developer d474c5d
feat: update ci
m-xim 0f497a6
style: refactor code for improved readability and formatting consistency
ink-developer c618db4
Merge branch 'dev/2.2.0' into main
m-xim c0e0d7b
Merge pull request #53 from m-xim/main
ink-developer 75fc3d8
docs: update API documentation for Client and WebClient, add device t…
ink-developer e58a8c6
feat: implement binding for API models to enhance data handling acros…
ink-developer 2cd291e
Merge remote-tracking branch 'origin/main' into dev/2.2.0
ink-developer c9ad0ce
feat: support SMS registration confirmation
ink-developer acecfce
fix: clarify read receipt message id types
ink-developer d7dabd3
chore: align ruff formatting for CI
ink-developer 22d7efa
fix: handle non-BMP UTF-16 characters in markdown formatting
Arondy 7d84d01
fix: support web message deletion events
ink-developer 1db3eaa
Merge pull request #63 from Arondy/fix/non-bmp-utf16-positions
ink-developer 29e0e43
feat: add typing event handler
ink-developer dfb0c5f
feat: add reaction update event handler
ink-developer 6644e2d
feat: add get message method
ink-developer 874c804
feat: add edit message method
ink-developer c70a342
feat: add get messages method
ink-developer 8346c48
feat: add read and presence events
ink-developer 25cf64a
fix: harden release event and auth handling
ink-developer b0c5fce
chore: prepare release 2.2.0
ink-developer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| name: Tests | ||
|
|
||
| on: | ||
| pull_request: | ||
| push: | ||
| branches: [main, "dev/**"] | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: checks-${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| lint: | ||
| name: Lint | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v6 | ||
|
|
||
| - name: Install uv | ||
| uses: astral-sh/setup-uv@v8.1.0 | ||
| with: | ||
| enable-cache: true | ||
|
|
||
| - name: Install development dependencies | ||
| run: uv sync --group dev | ||
|
|
||
| - name: Check code formatting | ||
| run: uv run ruff format --check . | ||
|
|
||
| - name: Run Ruff linting | ||
| run: uv run ruff check . | ||
|
|
||
| tests: | ||
| name: Tests / Python ${{ matrix.python-version }} | ||
| runs-on: ubuntu-latest | ||
|
|
||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v6 | ||
|
|
||
| - name: Install uv | ||
| uses: astral-sh/setup-uv@v8.1.0 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
| enable-cache: true | ||
|
|
||
| - name: Install development dependencies | ||
| run: uv sync --group dev | ||
|
|
||
| - name: Run tests with coverage | ||
| run: | | ||
| uv run pytest \ | ||
| --cov=src/pymax \ | ||
| --cov-report=term-missing:skip-covered \ | ||
| --cov-report=markdown-append:$GITHUB_STEP_SUMMARY | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| Client | ||
| ====== | ||
|
|
||
| .. currentmodule:: pymax | ||
|
|
||
| TCP-клиент с SMS-авторизацией. Это основной клиент для long-running | ||
| подключения, обработчиков событий и mobile API Max. | ||
|
|
||
| .. note:: | ||
|
|
||
| ``Client`` поддерживает ``ExtraConfig.device_type`` со значениями | ||
| ``ANDROID``, ``IOS`` и ``DESKTOP``. Для :meth:`Client.authorize_qr_login` | ||
| используйте ``ANDROID`` или ``IOS``: с ``DESKTOP`` подтверждение QR-входа | ||
| не работает. | ||
|
|
||
| .. autoclass:: Client | ||
| :members: | ||
| :inherited-members: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| Client Config | ||
| ============= | ||
|
|
||
| .. currentmodule:: pymax | ||
|
|
||
| Настройки, которые используются ``Client`` и ``WebClient``. | ||
|
|
||
| .. autoclass:: ExtraConfig | ||
| :members: | ||
|
|
||
| .. autoclass:: RegistrationConfig | ||
| :members: | ||
|
|
||
| .. autofunction:: configure_logging |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| WebClient | ||
| ========= | ||
|
|
||
| .. currentmodule:: pymax | ||
|
|
||
| WebSocket-клиент с QR-авторизацией. Он подходит, когда нужно подключаться как | ||
| web-клиент Max. | ||
|
|
||
| .. note:: | ||
|
|
||
| В штатной конфигурации ``WebClient`` использует только ``DeviceType.WEB``. | ||
| Параметр ``ExtraConfig.device_type`` предназначен для ``Client`` и не | ||
| меняет тип устройства ``WebClient``. | ||
|
|
||
| .. autoclass:: WebClient | ||
| :members: | ||
| :inherited-members: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,17 +1,25 @@ | ||
| Client API | ||
| ========== | ||
| Clients API | ||
| =========== | ||
|
|
||
| .. currentmodule:: pymax | ||
|
|
||
| .. autoclass:: Client | ||
| :members: | ||
| :inherited-members: | ||
| ``Client`` и ``WebClient`` используют общий набор высокоуровневых методов, | ||
| но отличаются транспортом и способом авторизации: | ||
|
|
||
| .. autoclass:: WebClient | ||
| :members: | ||
| :inherited-members: | ||
| ``Client`` | ||
| TCP-клиент с SMS-авторизацией. Поддерживает mobile ``device_type``: | ||
| ``ANDROID``, ``IOS`` и ``DESKTOP``. Для подтверждения QR-входа через | ||
| :meth:`Client.authorize_qr_login` используйте ``ANDROID`` или ``IOS``: | ||
| с ``DESKTOP`` этот метод не работает. | ||
|
|
||
| .. autoclass:: ExtraConfig | ||
| :members: | ||
| ``WebClient`` | ||
| WebSocket-клиент с QR-авторизацией. В штатной конфигурации всегда | ||
| использует ``DeviceType.WEB``; ``ExtraConfig.device_type`` на него не | ||
| влияет. | ||
|
|
||
| .. autofunction:: configure_logging | ||
| .. toctree:: | ||
| :maxdepth: 1 | ||
|
|
||
| client-client | ||
| client-web | ||
| client-config |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: MaxApiTeam/PyMax
Length of output: 596
🏁 Script executed:
Repository: MaxApiTeam/PyMax
Length of output: 228
🏁 Script executed:
Repository: MaxApiTeam/PyMax
Length of output: 1447
Pin GitHub Actions to commit SHAs and disable checkout credential persistence.
.github/workflows/tests.ymlusesactions/checkout@v6andastral-sh/setup-uv@v8.1.0(tag-based, not full commit SHAs).actions/checkoutsteps lackwith: persist-credentials: false.🔧 Suggested hardening diff
🧰 Tools
🪛 zizmor (1.25.2)
[warning] 22-23: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false
(artipacked)
[error] 23-23: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)
(unpinned-uses)
🤖 Prompt for AI Agents
Source: Linters/SAST tools