Skip to content

Commit 8e0ff82

Browse files
committed
CH-147 linting automation
1 parent 33180a7 commit 8e0ff82

3 files changed

Lines changed: 25 additions & 8 deletions

File tree

.github/workflows/lint-check.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Lint Check
2+
3+
on:
4+
push
5+
6+
jobs:
7+
lint:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- name: Checkout repository
12+
uses: actions/checkout@v2
13+
14+
- name: Set up Python
15+
uses: actions/setup-python@v2
16+
with:
17+
python-version: '3.x'
18+
19+
- name: Install autopep8
20+
run: pip install autopep8
21+
22+
- name: Run lint-check.sh
23+
run: bash lint-check.sh

libraries/client/cloudharness_cli/cloudharness_cli/samples/paths/operation_async/get.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
from cloudharness_cli.samples import schemas # noqa: F401
2727

28-
from cloudharness_cli/samples.model.inline_response202 import InlineResponse202
28+
from cloudharness_cli.samples.model.inline_response202 import InlineResponse202
2929

3030
from . import path
3131

@@ -231,5 +231,3 @@ def get(
231231
timeout=timeout,
232232
skip_deserialization=skip_deserialization
233233
)
234-
235-

lint.sh renamed to lint-check.sh

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
#!/bin/bash
22
# Run autopep8 with --diff and capture the output
3-
diff_output=$(autopep8 --select=E1,E2,E3,W,E4,E7,E502 --recursive --diff\
4-
--exclude '**/cloudharness_cli/**/*'\
5-
--exclude '**/models/*'\
6-
--exclude '**/model/*'\
7-
.)
3+
diff_output=$(autopep8 --select=E1,E2,E3,W,E4,E7,E502 --recursive --diff --exclude '**/cloudharness_cli/**/*,**/models/*,**/model/*' .)
84
# Check if the output is non-empty
95
if [ -n "$diff_output" ]; then
106
echo $diff_output

0 commit comments

Comments
 (0)