-
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Make ruff sort imports #47
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,18 @@ | ||
import argparse | ||
import json | ||
import logging | ||
from dataclasses import dataclass, field | ||
from enum import Enum | ||
from getpass import getpass | ||
import logging | ||
import json | ||
from urllib.parse import urljoin | ||
from pathlib import Path | ||
from time import sleep | ||
from typing import AnyStr, Optional | ||
from urllib.parse import urljoin | ||
from xml.etree.ElementTree import Element, tostring | ||
|
||
from html2text import html2text | ||
import htmlement | ||
import requests | ||
|
||
from html2text import html2text | ||
|
||
logger = logging.getLogger(name="tyora") | ||
|
||
Comment on lines
1
to
18
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. CODE REVIEWYour import reorganization improves readability, but some imports still need adjustments.
import argparse
import json
import logging
from dataclasses import dataclass, field
from enum import Enum
from getpass import getpass
from pathlib import Path
from time import sleep
from typing import AnyStr, Optional
from urllib.parse import urljoin
from xml.etree.ElementTree import Element, tostring
import html2text
import htmlement
import requests |
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
from html.parser import HTMLParser | ||
import io | ||
from html.parser import HTMLParser | ||
from typing import Optional | ||
from xml.etree.ElementTree import Element | ||
|
||
Comment on lines
1
to
5
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. CODE REVIEWGreat addition of from html.parser import HTMLParser
from typing import Optional
from xml.etree.ElementTree import Element
import io |
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import tyora | ||
import pytest | ||
import requests_mock | ||
import tyora | ||
|
||
|
||
def test_parse_args_missing_args() -> None: | ||
Comment on lines
1
to
6
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. CODE REVIEW
import pytest
import requests_mock
import tyora This keeps imports clean and manageable. |
||
|
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.
CODE REVIEW
Your changes improve the specific linting rules applied. However:
ruff-format
aligns with your code style.repo:
formypy
is intentional.Example: