Skip to content

Commit 3aa879e

Browse files
authored
Enforce import sorting
1 parent c90166c commit 3aa879e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+287
-252
lines changed

.github/workflows/check.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,6 @@ jobs:
2828
- name: Run format check
2929
run: |
3030
pipenv run yapf --diff --recursive .
31+
32+
- name: Run isort check
33+
run: pipenv run isort --check-only --diff .

.isort.cfg

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[settings]
2+
combine_as_imports = true
3+
multi_line_output = 3
4+
include_trailing_comma = true
5+
src_paths = ["nats", "tests"]

Pipfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ pytest-cov = "*"
1111
yapf = "*"
1212
toml = "*" # see https://github.com/google/yapf/issues/936
1313
exceptiongroup = "*"
14+
isort = "*"

Pipfile.lock

Lines changed: 178 additions & 125 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

benchmark/latency_perf.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import asyncio
33
import sys
44
import time
5-
from random import randint
65

76
import nats
87

benchmark/sub_perf.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import asyncio
33
import sys
44
import time
5-
from random import randint
65

76
import nats
87

examples/advanced.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import asyncio
2+
23
import nats
34
from nats.errors import NoServersError, TimeoutError
45

examples/basic.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import asyncio
2+
23
import nats
3-
from nats.errors import TimeoutError
44
from common import args
5+
from nats.errors import TimeoutError
56

67

78
async def main():

examples/client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import asyncio
22
from datetime import datetime
3+
4+
from common import args
35
from nats.aio.client import Client as NATS
46
from nats.errors import ConnectionClosedError, TimeoutError
5-
from common import args
67

78

89
class Client:

examples/clustered.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import asyncio
22
from datetime import datetime
3+
34
import nats
4-
from nats.aio.client import Client as NATS
55
from nats.aio.errors import ErrConnectionClosed, ErrNoServers, ErrTimeout
66

77

0 commit comments

Comments
 (0)