File tree Expand file tree Collapse file tree 3 files changed +54
-36
lines changed Expand file tree Collapse file tree 3 files changed +54
-36
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ # Copyright 2022 Google LLC
2+ #
3+ # Licensed under the Apache License, Version 2.0 (the "License");
4+ # you may not use this file except in compliance with the License.
5+ # You may obtain a copy of the License at
6+ #
7+ # http://www.apache.org/licenses/LICENSE-2.0
8+ #
9+ # Unless required by applicable law or agreed to in writing, software
10+ # distributed under the License is distributed on an "AS IS" BASIS,
11+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+ # See the License for the specific language governing permissions and
13+ # limitations under the License.
14+
15+ name : Lint
16+ on : [pull_request]
17+
18+ jobs :
19+ build :
20+ name : Run lint
21+ runs-on : ubuntu-latest
22+ steps :
23+ - name : Setup Python
24+ uses : actions/setup-python@v3
25+ with :
26+ python-version : " 3.9"
27+
28+ - name : Install nox
29+ run : pip install nox
30+
31+ - name : Checkout code
32+ uses : actions/checkout@v3
33+
34+ - name : Run nox lint session
35+ run : nox --sessions lint
Original file line number Diff line number Diff line change 1+ from __future__ import absolute_import
2+ import os
3+ import nox
4+
5+ BLACK_PATHS = ["iam_groups_authn" ]
6+
7+ if os .path .exists ("samples" ):
8+ BLACK_PATHS .append ("samples" )
9+
10+
11+ @nox .session
12+ def lint (session ):
13+ """Run linters.
14+ Returns a failure if the linters find linting errors or sufficiently
15+ serious code quality issues.
16+ """
17+ session .install ("-r" , "requirements-test.txt" )
18+ session .install ("-r" , "requirements.txt" )
19+ session .run ("black" , "--check" , * BLACK_PATHS )
You can’t perform that action at this time.
0 commit comments