Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
RootShinobi committed Feb 27, 2024
1 parent ef32088 commit 405b05b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ To use FluentCompileCore:
To use FluentRuntimeCore:
```pip install fluent.runtime```


```python
import asyncio
from contextlib import suppress
Expand All @@ -21,14 +20,13 @@ from aiogram.enums import ParseMode
from aiogram.filters import CommandStart
from aiogram.types import Message

from aiogram_i18n import I18nContext, LazyProxy, I18nMiddleware
from aiogram_i18n import I18nContext, LazyProxy, I18nMiddleware, LazyFilter
from aiogram_i18n.cores.fluent_runtime_core import FluentRuntimeCore
from aiogram_i18n.types import (
ReplyKeyboardMarkup, KeyboardButton
# you should import mutable objects from here if you want to use LazyProxy in them
)


router = Router(name=__name__)
rkb = ReplyKeyboardMarkup(
keyboard=[
Expand All @@ -46,7 +44,7 @@ async def cmd_start(message: Message, i18n: I18nContext) -> Any:
)


@router.message(F.text == LazyProxy("help"))
@router.message(LazyFilter("help")) # or LazyProxy("help") or F.text == LazyProxy("help")
async def cmd_help(message: Message) -> Any:
return message.reply(text="-- " + message.text + " --")

Expand Down
3 changes: 2 additions & 1 deletion aiogram_i18n/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from .__meta__ import __version__
from .context import I18nContext
from .lazy import LazyFactory, LazyProxy
from .lazy import LazyFactory, LazyProxy, LazyFilter
from .middleware import I18nMiddleware

L = LazyFactory()

Check failure on line 6 in aiogram_i18n/__init__.py

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 3.8)

Ruff (I001)

aiogram_i18n/__init__.py:1:1: I001 Import block is un-sorted or un-formatted

Check failure on line 6 in aiogram_i18n/__init__.py

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 3.9)

Ruff (I001)

aiogram_i18n/__init__.py:1:1: I001 Import block is un-sorted or un-formatted

Check failure on line 6 in aiogram_i18n/__init__.py

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 3.10)

Ruff (I001)

aiogram_i18n/__init__.py:1:1: I001 Import block is un-sorted or un-formatted

Check failure on line 6 in aiogram_i18n/__init__.py

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 3.11)

Ruff (I001)

aiogram_i18n/__init__.py:1:1: I001 Import block is un-sorted or un-formatted

Check failure on line 6 in aiogram_i18n/__init__.py

View workflow job for this annotation

GitHub Actions / build (macos-latest, 3.8)

Ruff (I001)

aiogram_i18n/__init__.py:1:1: I001 Import block is un-sorted or un-formatted

Check failure on line 6 in aiogram_i18n/__init__.py

View workflow job for this annotation

GitHub Actions / build (macos-latest, 3.9)

Ruff (I001)

aiogram_i18n/__init__.py:1:1: I001 Import block is un-sorted or un-formatted

Check failure on line 6 in aiogram_i18n/__init__.py

View workflow job for this annotation

GitHub Actions / build (macos-latest, 3.10)

Ruff (I001)

aiogram_i18n/__init__.py:1:1: I001 Import block is un-sorted or un-formatted

Check failure on line 6 in aiogram_i18n/__init__.py

View workflow job for this annotation

GitHub Actions / build (macos-latest, 3.11)

Ruff (I001)

aiogram_i18n/__init__.py:1:1: I001 Import block is un-sorted or un-formatted

Check failure on line 6 in aiogram_i18n/__init__.py

View workflow job for this annotation

GitHub Actions / build (windows-latest, 3.8)

Ruff (I001)

aiogram_i18n\__init__.py:1:1: I001 Import block is un-sorted or un-formatted

Check failure on line 6 in aiogram_i18n/__init__.py

View workflow job for this annotation

GitHub Actions / build (windows-latest, 3.9)

Ruff (I001)

aiogram_i18n\__init__.py:1:1: I001 Import block is un-sorted or un-formatted

Check failure on line 6 in aiogram_i18n/__init__.py

View workflow job for this annotation

GitHub Actions / build (windows-latest, 3.10)

Ruff (I001)

aiogram_i18n\__init__.py:1:1: I001 Import block is un-sorted or un-formatted

Check failure on line 6 in aiogram_i18n/__init__.py

View workflow job for this annotation

GitHub Actions / build (windows-latest, 3.11)

Ruff (I001)

aiogram_i18n\__init__.py:1:1: I001 Import block is un-sorted or un-formatted
Expand All @@ -9,6 +9,7 @@
"__version__",
"I18nContext",
"LazyProxy",
"LazyFilter",
"I18nMiddleware",
"L",
)

0 comments on commit 405b05b

Please sign in to comment.