Skip to content

Commit 54e74a9

Browse files
[isort] Lib modules (#1016)
* isort `proxy.py` main class * isort init and main * isort common * pre-commit fix * isort dashboard and testing * isort plugins * isort core * Only sort top level http py files * isort http exception and websocket * Remove proxy auth plugin from proxy package exports and force discover `PLUGIN_PROXY_AUTH` flags * isort parser and web server * no setattr * isort all * Enable pre-commit isort hook * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 77b69e6 commit 54e74a9

File tree

124 files changed

+428
-419
lines changed

Some content is hidden

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

124 files changed

+428
-419
lines changed

.pre-commit-config.yaml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ repos:
77
args:
88
- --py36-plus
99

10-
# - repo: https://github.com/timothycrosley/isort.git
11-
# rev: 5.10.0
12-
# hooks:
13-
# - id: isort
14-
# args:
15-
# - --honor-noqa
10+
- repo: https://github.com/timothycrosley/isort.git
11+
rev: 5.10.0
12+
hooks:
13+
- id: isort
14+
args:
15+
- --honor-noqa
1616

1717
- repo: https://github.com/Lucas-C/pre-commit-hooks.git
1818
rev: v1.1.7
@@ -24,8 +24,7 @@ repos:
2424
helper/proxy\.pac|
2525
Makefile|
2626
proxy/common/pki\.py|
27-
README\.md|
28-
.+\.(plist|pbxproj)
27+
README\.md
2928
$
3029
3130
- repo: https://github.com/pre-commit/pre-commit-hooks.git
@@ -36,7 +35,6 @@ repos:
3635
exclude: |
3736
(?x)
3837
^
39-
\.github/workflows/codeql-analysis\.yml|
4038
dashboard/src/core/plugins/inspect_traffic\.json
4139
$
4240
- id: check-merge-conflict

benchmark/_blacksheep.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
:license: BSD, see LICENSE for more details.
1010
"""
1111
import uvicorn
12-
1312
from blacksheep.server import Application
1413
from blacksheep.server.responses import text
1514

benchmark/_proxy.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"""
1111
import time
1212
import ipaddress
13+
1314
import proxy
1415

1516

benchmark/_starlette.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,9 @@
99
:license: BSD, see LICENSE for more details.
1010
"""
1111
import uvicorn
12-
13-
from starlette.applications import Starlette
14-
from starlette.responses import Response
1512
from starlette.routing import Route
13+
from starlette.responses import Response
14+
from starlette.applications import Starlette
1615

1716

1817
async def homepage(request): # type: ignore[no-untyped-def]

benchmark/_tornado.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
:copyright: (c) 2013-present by Abhinav Singh and contributors.
99
:license: BSD, see LICENSE for more details.
1010
"""
11-
import tornado.ioloop
1211
import tornado.web
12+
import tornado.ioloop
1313

1414

1515
# pylint: disable=W0223

docs/_ext/spelling_stub_ext.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
from typing import List
44

5+
from sphinx.util.nodes import nodes
56
from sphinx.application import Sphinx
67
from sphinx.util.docutils import SphinxDirective
7-
from sphinx.util.nodes import nodes
88

99

1010
class SpellingNoOpDirective(SphinxDirective):

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"""Configuration for the Sphinx documentation generator."""
55

66
import sys
7-
from functools import partial
87
from pathlib import Path
8+
from functools import partial
99

1010
from setuptools_scm import get_version
1111

examples/web_scraper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
import time
1212

1313
from proxy import Proxy
14-
from proxy.common.types import Readables, Writables, SelectableEvents
1514
from proxy.core.work import Work
15+
from proxy.common.types import Readables, Writables, SelectableEvents
1616
from proxy.core.connection import TcpClientConnection
1717

1818

proxy/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@
88
:copyright: (c) 2013-present by Abhinav Singh and contributors.
99
:license: BSD, see LICENSE for more details.
1010
"""
11-
from .proxy import entry_point, main, Proxy, sleep_loop
11+
from .proxy import Proxy, main, sleep_loop, entry_point
1212
from .testing import TestCase
1313

14+
1415
__all__ = [
1516
# PyPi package entry_point. See
1617
# https://github.com/abhinavsingh/proxy.py#from-command-line-when-installed-using-pip

proxy/__main__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@
1010
"""
1111
from .proxy import entry_point
1212

13+
1314
if __name__ == '__main__':
1415
entry_point()

0 commit comments

Comments
 (0)