Skip to content
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

Fix code indent in readme.md #183

Merged
merged 4 commits into from
Jul 13, 2024
Merged

Fix code indent in readme.md #183

merged 4 commits into from
Jul 13, 2024

Conversation

aisk
Copy link
Contributor

@aisk aisk commented May 25, 2024

No description provided.

@dimaqq
Copy link
Contributor

dimaqq commented May 25, 2024

I think that original indentation was intended.

The example tries to show how to use the library in an asynchronous function and what imports are needed.

After all, you can’t have async with at the module level, can you?

@aisk
Copy link
Contributor Author

aisk commented May 25, 2024

I think it's not indented, for example with this code in README:

from aiodynamo.client import Client
from aiodynamo.credentials import Credentials
from aiodynamo.http.httpx import HTTPX
from httpx import AsyncClient

    async with AsyncClient() as h:
        client = Client(HTTPX(h), Credentials.auto(), "us-east-1")

Run it with Python will got this error:

$ python3 a.py
  File "/private/tmp/a.py", line 6
    async with AsyncClient() as h:
IndentationError: unexpected indent

If the example is just a show to how to use this code, I think maybe we can wrap the code with line 6 in a function?

@dimaqq
Copy link
Contributor

dimaqq commented May 27, 2024

Maybe @ojii can make a call on this one.

Doc source code-wise it's fine.

readme.md Outdated Show resolved Hide resolved
@ojii
Copy link
Contributor

ojii commented May 28, 2024

reading our current README I'm not sure what I was thinking with that indentation without having stuff in functions, so this proposed patch makes things a lot nicer, thank you @aisk.

@ojii ojii merged commit 8688519 into HENNGE:master Jul 13, 2024
@ojii
Copy link
Contributor

ojii commented Jul 13, 2024

thank you

@aisk aisk deleted the patch-1 branch July 13, 2024 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants