Skip to content

Commit 7761fe5

Browse files
authored
Merge pull request #771 from MetaCell/feature/CH-147-lint
Feature/ch 147 lint
2 parents d74f534 + 2dc0b2c commit 7761fe5

124 files changed

Lines changed: 952 additions & 976 deletions

File tree

Some content is hidden

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

.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

application-templates/base/test/api/test_st.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import schemathesis as st
44
from schemathesis.checks import response_schema_conformance, not_a_server_error
55

6-
from cloudharness_test import apitest_init # include to perform default authorization
6+
from cloudharness_test import apitest_init # include to perform default authorization
77

88
app_url = os.environ.get("APP_URL", "http://samples.ch.local/api")
99

@@ -15,4 +15,3 @@ def test_ping(case):
1515
response = case.call()
1616
pprint(response.__dict__)
1717
assert response.status_code == 200, "this api errors on purpose"
18-

application-templates/django-app/api/test_st.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import schemathesis as st
44
from schemathesis.checks import response_schema_conformance, not_a_server_error
55

6-
from cloudharness_test import apitest_init # include to perform default authorization
6+
from cloudharness_test import apitest_init # include to perform default authorization
77

88
app_url = os.environ.get("APP_URL", "http://samples.ch.local/api")
99

@@ -20,8 +20,9 @@ def test_ping(case):
2020
pprint(response.__dict__)
2121
assert response.status_code == 200, "this api errors on purpose"
2222

23+
2324
def test_state_machine():
2425
schema.as_state_machine().run()
2526
# APIWorkflow = schema.as_state_machine()
2627
# APIWorkflow.run()
27-
# TestAPI = APIWorkflow.TestCase
28+
# TestAPI = APIWorkflow.TestCase

application-templates/django-app/backend/__APP_NAME__/asgi.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
application = get_asgi_application()
1717

1818
# init the auth service
19-
from cloudharness_django.services import init_services
19+
from cloudharness_django.services import init_services # noqa E402
2020

2121
init_services()
2222

2323
# start the kafka event listener
24-
import cloudharness_django.services.events
24+
import cloudharness_django.services.events # noqa E402

application-templates/django-app/backend/__APP_NAME__/settings.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,13 +120,13 @@
120120
# ***********************************************************************
121121
# * __APP_NAME__ settings
122122
# ***********************************************************************
123-
from cloudharness.applications import get_configuration
124-
from cloudharness.utils.config import ALLVALUES_PATH, CloudharnessConfig
123+
from cloudharness.applications import get_configuration # noqa E402
124+
from cloudharness.utils.config import ALLVALUES_PATH, CloudharnessConfig # noqa E402
125125

126126
# ***********************************************************************
127127
# * import base CloudHarness Django settings
128128
# ***********************************************************************
129-
from cloudharness_django.settings import *
129+
from cloudharness_django.settings import * # noqa E402
130130

131131
# add the local apps
132132
INSTALLED_APPS += [

application-templates/django-app/backend/__APP_NAME__/urls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
urlpatterns = [path("admin/", admin.site.urls)]
2626
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) + \
27-
static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
27+
static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
2828
urlpatterns += [re_path(r"^(?P<path>.*)$", index, name="index")]
2929

3030
admin.site.site_header = "__APP_NAME__ Admin"

application-templates/django-app/backend/__APP_NAME__/wsgi.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
application = get_wsgi_application()
1717

1818
# init the auth service
19-
from cloudharness_django.services import init_services
19+
from cloudharness_django.services import init_services # noqa E402
2020

2121
init_services()
2222

2323
# start the kafka event listener
24-
import cloudharness_django.services.events
24+
import cloudharness_django.services.events # noqa E402
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
import api.controllers.test as test_controller
1+
import api.controllers.test as test_controller

application-templates/flask-server/backend/__APP_NAME__/__main__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,3 @@
77

88
if __name__ == '__main__':
99
main()
10-

application-templates/flask-server/backend/setup.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,3 @@
3838
__APP_NAME__
3939
"""
4040
)
41-

0 commit comments

Comments
 (0)