File tree Expand file tree Collapse file tree 4 files changed +45
-145
lines changed
Expand file tree Collapse file tree 4 files changed +45
-145
lines changed Original file line number Diff line number Diff line change @@ -30,27 +30,10 @@ jobs:
3030 - uses : " actions/setup-python@v6"
3131 with :
3232 python-version : " 3.10"
33- - name : " Setup Python Environment"
34- run : " pip install -U pip virtualenv"
35- - name : " Install Dependencies"
36- run : |
37- virtualenv ~/.cache/virtualenv/authzedpy
38- source ~/.cache/virtualenv/authzedpy/bin/activate
39- pip install poetry
40- poetry env info
41- poetry install --only dev
42- - name : " Pyflakes"
43- run : |
44- source ~/.cache/virtualenv/authzedpy/bin/activate
45- find . -name "*.py" | grep -v "_pb2" | xargs pyflakes
46- - name : " Blacken"
47- run : |
48- source ~/.cache/virtualenv/authzedpy/bin/activate
49- black --check --diff .
50- - name : " Isort"
51- run : |
52- source ~/.cache/virtualenv/authzedpy/bin/activate
53- find . -name "*.py" | grep -v "_pb2" | xargs isort --check --diff
33+ # Installs ruff and runs check
34+ - uses : " astral-sh/ruff-action@v3"
35+ # Check formatting as well
36+ - run : " ruff format --check --diff"
5437 codeql :
5538 name : " Analyze with CodeQL"
5639 runs-on : " ubuntu-latest"
Original file line number Diff line number Diff line change @@ -29,21 +29,24 @@ googleapis-common-protos = "^1.65.0"
2929protovalidate = " >=0.7.1,<1.1.0"
3030
3131[tool .poetry .group .dev .dependencies ]
32- black = " >=23.3,<26.0"
3332grpc-stubs = " ^1.53"
3433grpcio-tools = " >=1.63,<1.72"
35- isort = " >=5.6.4,<7.0.0"
3634mypy = " 1.18.1"
3735mypy-protobuf = " 3.6.0"
3836mock = " ^5.1.0"
39- pyflakes = " ^3.0.1"
4037pytest = " >=7.1.3,<9.0.0"
4138pytest-asyncio = " >=0.21,<1.3"
4239types-protobuf = " >=5.26,<7.0"
4340typing-extensions = " >=3.7.4,<5"
41+ ruff = " ^0.13.0"
4442
45- [tool .black ]
46- exclude = ' (^\.(.*)|^(.*)_pb2(_grpc)?\.py)'
43+ [tool .ruff ]
44+ exclude = [
45+ " *_pb2.py" ,
46+ " *_grpc.py" ,
47+ " *_pb2.pyi" ,
48+ " *_grpc.pyi" ,
49+ ]
4750line-length = 100
4851
4952[tool .mypy ]
@@ -59,14 +62,6 @@ log_level = "debug"
5962minversion = " 6.0"
6063asyncio_mode = " auto"
6164
62- [tool .isort ]
63- ensure_newline_before_comments = true
64- force_grid_wrap = 0
65- include_trailing_comma = true
66- line_length = 100
67- multi_line_output = 3
68- use_parentheses = true
69-
7065[build-system ]
7166build-backend = " poetry.core.masonry.api"
7267requires = [" poetry-core>=1.0.0" ]
Original file line number Diff line number Diff line change @@ -328,7 +328,7 @@ async def test_bulk_export_import(client):
328328
329329 # do bulk import
330330 reqs = [BulkImportRelationshipsRequest (relationships = rels )]
331- import_rels = await maybe_await (empty_client .BulkImportRelationships ((( req for req in reqs ) )))
331+ import_rels = await maybe_await (empty_client .BulkImportRelationships ((req for req in reqs )))
332332 assert import_rels .num_loaded == 4
333333
334334 # validate all relationships were imported
You can’t perform that action at this time.
0 commit comments