Skip to content

Commit 1ac0f09

Browse files
committed
review changes
1 parent 9c984aa commit 1ac0f09

File tree

9 files changed

+11
-11
lines changed

9 files changed

+11
-11
lines changed

extras/custom_checks.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,10 @@ function check_do_not_import_tests_in_hathor() {
9292
function check_do_not_import_from_hathor_in_entrypoints() {
9393
PATTERN='^import .*hathor.*\|^from .*hathor.* import'
9494

95-
if grep -R "$PATTERN" "hathor/cli" | grep -v '# no-custom-check'; then
95+
if grep -R "$PATTERN" "hathor/cli" | grep -v 'from hathor.cli.run_node import RunNode' | grep -v '# skip-cli-import-custom-check'; then
9696
echo 'do not import from `hathor` in the module-level of a CLI entrypoint.'
9797
echo 'instead, import locally inside the function that uses the import.'
98-
echo 'alternatively, comment `# no-custom-check` to exclude a line.'
98+
echo 'alternatively, comment `# skip-cli-import-custom-check` to exclude a line.'
9999
return 1
100100
fi
101101
return 0

hathor/cli/db_export.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from argparse import ArgumentParser, FileType
1818
from typing import TYPE_CHECKING, Iterator, Optional
1919

20-
from hathor.cli.run_node import RunNode # no-custom-check
20+
from hathor.cli.run_node import RunNode
2121

2222
if TYPE_CHECKING:
2323
from hathor.transaction import BaseTransaction

hathor/cli/db_import.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from argparse import ArgumentParser, FileType
1919
from typing import TYPE_CHECKING, Iterator
2020

21-
from hathor.cli.run_node import RunNode # no-custom-check
21+
from hathor.cli.run_node import RunNode
2222

2323
if TYPE_CHECKING:
2424
from hathor.transaction import BaseTransaction

hathor/cli/events_simulator/event_forwarding_websocket_factory.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
from twisted.internet.interfaces import IAddress
1818

19-
from hathor.event.websocket import EventWebsocketFactory # no-custom-check
19+
from hathor.event.websocket import EventWebsocketFactory # skip-cli-import-custom-check
2020

2121
if TYPE_CHECKING:
2222
from hathor.cli.events_simulator.event_forwarding_websocket_protocol import EventForwardingWebsocketProtocol

hathor/cli/events_simulator/event_forwarding_websocket_protocol.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
from autobahn.websocket import ConnectionRequest
1818

19-
from hathor.event.websocket import EventWebsocketProtocol # no-custom-check
19+
from hathor.event.websocket import EventWebsocketProtocol # skip-cli-import-custom-check
2020

2121
if TYPE_CHECKING:
2222
from hathor.cli.events_simulator.event_forwarding_websocket_factory import EventForwardingWebsocketFactory

hathor/cli/openapi_files/register.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
from typing import TypeVar
1616

17-
from hathor.api_util import Resource # no-custom-check
17+
from hathor.api_util import Resource # skip-cli-import-custom-check
1818

1919
_registered_resources: list[type[Resource]] = []
2020

hathor/cli/quick_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
from argparse import ArgumentParser
1616

17-
from hathor.cli.run_node import RunNode # no-custom-check
17+
from hathor.cli.run_node import RunNode
1818

1919

2020
class QuickTest(RunNode):

hathor/cli/run_node_args.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616

1717
from pydantic import Extra
1818

19-
from hathor.feature_activation.feature import Feature # no-custom-check
20-
from hathor.utils.pydantic import BaseModel # no-custom-check
19+
from hathor.feature_activation.feature import Feature # skip-cli-import-custom-check
20+
from hathor.utils.pydantic import BaseModel # skip-cli-import-custom-check
2121

2222

2323
class RunNodeArgs(BaseModel, extra=Extra.allow):

hathor/cli/shell.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from argparse import Namespace
1616
from typing import Any, Callable
1717

18-
from hathor.cli.run_node import RunNode # no-custom-check
18+
from hathor.cli.run_node import RunNode
1919

2020

2121
def get_ipython(extra_args: list[Any], imported_objects: dict[str, Any]) -> Callable[[], None]:

0 commit comments

Comments
 (0)