File tree Expand file tree Collapse file tree 5 files changed +32
-6
lines changed Expand file tree Collapse file tree 5 files changed +32
-6
lines changed Original file line number Diff line number Diff line change @@ -113,11 +113,15 @@ jobs:
113113 with :
114114 python-version : ' 3.11'
115115 architecture : ' x64'
116- - name : Install pylint
117- run : pip install -r dev_tools/requirements/pylint.env.txt
118- - name : Display version
119- run : check/pylint --version
120- - name : Lint
116+ - name : Install lint tools
117+ run : pip install -r dev_tools/requirements/lint.env.txt
118+ - name : Display versions
119+ run : |
120+ ruff --version
121+ check/pylint --version
122+ - name : Lint with ruff
123+ run : FORCE_COLOR=1 ruff check
124+ - name : Lint with pylint
121125 run : check/pylint -v
122126 doc_test :
123127 if : github.repository_owner == 'quantumlib'
Original file line number Diff line number Diff line change 66-r notebook.txt
77-r tensorflow-docs.txt
88-r packaging.txt
9+ -r ruff.txt
910
1011# For testing and analyzing code.
1112asv
Original file line number Diff line number Diff line change 1+ ruff~=0.11.11
Original file line number Diff line number Diff line change 22-r deps/cirq-all.txt
33
44-r deps/pylint.txt
5+ -r deps/ruff.txt
Original file line number Diff line number Diff line change @@ -15,7 +15,6 @@ include = [
1515]
1616omit = [" benchmarks/*" ]
1717
18-
1918[tool .coverage .report ]
2019exclude_also = [
2120 " ^ *pass$" ,
@@ -48,3 +47,23 @@ markers = [
4847]
4948# Silence deprecation warnings about option "asyncio_default_fixture_loop_scope"
5049asyncio_default_fixture_loop_scope = " function"
50+
51+
52+ [tool .ruff ]
53+ line-length = 100
54+ target-version = " py311"
55+ extend-exclude = [" *_pb2.py*" ]
56+
57+ [tool .ruff .lint ]
58+ select = [
59+ # "ANN201", # missing-return-type-undocumented-public-function
60+ # "F401", # unused-import
61+ # "F601", # multi-value-repeated-key-literal
62+ " F821" , # undefined-name
63+ " TC001" , # typing-only-first-party-import
64+ " TC002" , # typing-only-third-party-import
65+ # "TC003", # typing-only-standard-library-import
66+ " UP006" , # non-pep585-annotation
67+ " UP007" , # non-pep604-annotation-union
68+ " UP037" , # quoted-annotation
69+ ]
You can’t perform that action at this time.
0 commit comments