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

Importing isort breaks Rich #1960

Closed
ofek opened this issue Aug 3, 2022 · 0 comments · Fixed by #1961
Closed

Importing isort breaks Rich #1960

ofek opened this issue Aug 3, 2022 · 0 comments · Fixed by #1961

Comments

@ofek
Copy link
Contributor

ofek commented Aug 3, 2022

from rich.console import Console
from rich.markdown import Markdown

MARKDOWN = """\
```python
from pathlib import Path

import httpx


def download(path: Path, *args, **kwargs):
    with httpx.stream('GET', *args, **kwargs) as response:
        response.raise_for_status()

        with path.open(mode='wb', buffering=0) as f:
            for chunk in response.iter_bytes(16384):
                f.write(chunk)
```
"""


def main():
    # Comment this out
    import isort

    Console().print(Markdown(MARKDOWN))


if __name__ == '__main__':
    main()
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 a pull request may close this issue.

1 participant