Skip to content

Commit f665ac2

Browse files
authored
minor: remove ieod bk sdk dep (#1)
* minor: remove ieod bk sdk dep * minor: add .flake8 * minor: flake8 fix * minor: flake8 fix
1 parent c481195 commit f665ac2

8 files changed

Lines changed: 62 additions & 40 deletions

File tree

bk-plugin-framework/.flake8

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
[flake8]
2+
ignore =
3+
;W503 line break before binary operator
4+
W503,
5+
;This behaviour may raise E203 whitespace before ':' warnings in style guide enforcement tools like Flake8.
6+
;Since E203 is not PEP 8 compliant, you should tell Flake8 to ignore these warnings.
7+
E203,
8+
C901
9+
10+
max-line-length = 120
11+
max-complexity = 25
12+
13+
; exclude file
14+
exclude =
15+
.tox,
16+
.git,
17+
__pycache__,
18+
build,
19+
dist,
20+
*.pyc,
21+
*.egg-info,
22+
.cache,
23+
.eggs

runtime/bk-plugin-runtime/.flake8

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
[flake8]
2+
ignore =
3+
;W503 line break before binary operator
4+
W503,
5+
;This behaviour may raise E203 whitespace before ':' warnings in style guide enforcement tools like Flake8.
6+
;Since E203 is not PEP 8 compliant, you should tell Flake8 to ignore these warnings.
7+
E203,
8+
C901
9+
10+
max-line-length = 120
11+
max-complexity = 25
12+
13+
; exclude file
14+
exclude =
15+
.tox,
16+
.git,
17+
__pycache__,
18+
build,
19+
dist,
20+
*.pyc,
21+
*.egg-info,
22+
.cache,
23+
.eggs

runtime/bk-plugin-runtime/bk_plugin_runtime/config/default.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,15 @@
1010
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
1111
specific language governing permissions and limitations under the License.
1212
"""
13-
from corsheaders.defaults import default_headers
13+
14+
import os
1415
from blueapps.conf.log import get_logging_config_dict
1516
from blueapps.conf.default_settings import * # noqa
1617

1718
BKPAAS_ENVIRONMENT = os.getenv("BKPAAS_ENVIRONMENT", "dev")
1819

1920
# 请在这里加入你的自定义 APP
20-
INSTALLED_APPS += (
21+
INSTALLED_APPS += ( # noqa
2122
"rest_framework",
2223
"drf_yasg",
2324
"bk_plugin_framework.runtime.loghub",
@@ -29,7 +30,7 @@
2930
)
3031

3132
if BKPAAS_ENVIRONMENT == "dev":
32-
INSTALLED_APPS += ("bk_plugin_framework.services.debug_panel",)
33+
INSTALLED_APPS += ("bk_plugin_framework.services.debug_panel",) # noqa
3334

3435
from bk_plugin_framework.runtime.schedule.celery import queues as schedule_queues # noqa
3536
from bk_plugin_framework.runtime.callback.celery import queues as callback_queues # noqa
@@ -61,7 +62,7 @@
6162
# )
6263

6364
# 自定义中间件
64-
MIDDLEWARE += (
65+
MIDDLEWARE += ( # noqa
6566
"corsheaders.middleware.CorsMiddleware",
6667
"bk_plugin_framework.services.bpf_service.middlewares.TraceIDInjectMiddleware",
6768
"apigw_manager.apigw.authentication.ApiGatewayJWTGenericMiddleware", # JWT 认证
@@ -80,7 +81,7 @@
8081
#
8182
STATIC_VERSION = "1.0"
8283

83-
STATICFILES_DIRS = [os.path.join(BASE_DIR, "static")]
84+
STATICFILES_DIRS = [os.path.join(BASE_DIR, "static")] # noqa
8485

8586
# CELERY 开关,使用时请改为 True,修改项目目录下的 Procfile 文件,添加以下两行命令:
8687
# worker: python manage.py celery worker -l info
@@ -113,7 +114,7 @@
113114
IS_AJAX_PLAIN_MODE = False
114115

115116
# 国际化配置
116-
LOCALE_PATHS = (os.path.join(BASE_DIR, "locale"),)
117+
LOCALE_PATHS = (os.path.join(BASE_DIR, "locale"),) # noqa
117118

118119
TIME_ZONE = "Asia/Shanghai"
119120
LANGUAGE_CODE = "zh-hans"
@@ -160,8 +161,8 @@
160161

161162
ROOT_URLCONF = "bk_plugin_runtime.urls"
162163

163-
from blueapps.core.celery import celery_app
164-
from bk_plugin_framework.runtime.schedule.celery.beat import SCHEDULE
164+
from blueapps.core.celery import celery_app # noqa
165+
from bk_plugin_framework.runtime.schedule.celery.beat import SCHEDULE # noqa
165166

166167
celery_app.conf.beat_schedule = SCHEDULE
167168

runtime/bk-plugin-runtime/bk_plugin_runtime/config/dev.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
DATABASES = {
4141
"default": {
4242
"ENGINE": "django.db.backends.sqlite3",
43-
"NAME": APP_CODE
43+
"NAME": APP_CODE # noqa
4444
},
4545
}
4646
# 本地开发是否使用mysql数据库
@@ -54,7 +54,7 @@
5454
port=int(os.getenv("BK_PLUGIN_RUNTIME_DB_PORT")),
5555
user=os.getenv("BK_PLUGIN_RUNTIME_DB_USER"),
5656
passwd=os.getenv("BK_PLUGIN_RUNTIME_DB_PWD"),
57-
db=APP_CODE,
57+
db=APP_CODE, # noqa
5858
)
5959
connect.close()
6060
is_exist_mysql = True
@@ -70,15 +70,15 @@
7070
DATABASES = {
7171
"default": {
7272
"ENGINE": "django.db.backends.mysql",
73-
"NAME": APP_CODE,
73+
"NAME": APP_CODE, # noqa
7474
"USER": os.getenv("BK_PLUGIN_RUNTIME_DB_USER"),
7575
"PASSWORD": os.getenv("BK_PLUGIN_RUNTIME_DB_PWD"),
7676
"HOST": os.getenv("BK_PLUGIN_RUNTIME_DB_HOST"),
7777
"PORT": os.getenv("BK_PLUGIN_RUNTIME_DB_PORT"),
7878
},
7979
}
8080

81-
default.logging_addition_settings(LOGGING)
81+
default.logging_addition_settings(LOGGING) # noqa
8282

8383
# 本地开发豁免 APIGW 来源校验
8484
BK_APIGW_REQUIRE_EXEMPT = True

runtime/bk-plugin-runtime/bk_plugin_runtime/config/prod.py

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -21,28 +21,4 @@
2121
# 正式环境
2222
RUN_MODE = "PRODUCT"
2323

24-
default.logging_addition_settings(LOGGING)
25-
26-
# V2
27-
# import logging
28-
# logging.getLogger('root').setLevel('INFO')
29-
# V3
30-
# import logging
31-
# logging.getLogger('app').setLevel('INFO')
32-
33-
34-
# 正式环境数据库可以在这里配置
35-
# 默认 default 请不要修改,如果使用了外部数据库,请联系【蓝鲸助手】授权
36-
# DATABASES.update(
37-
# {
38-
# # 外部数据库授权,请联系 【蓝鲸助手】
39-
# 'external_db': {
40-
# 'ENGINE': 'django.db.backends.mysql',
41-
# 'NAME': '', # 外部数据库名
42-
# 'USER': '', # 外部数据库用户
43-
# 'PASSWORD': '', # 外部数据库密码
44-
# 'HOST': '', # 外部数据库主机
45-
# 'PORT': '', # 外部数据库端口
46-
# },
47-
# }
48-
# )
24+
default.logging_addition_settings(LOGGING) # noqa

runtime/bk-plugin-runtime/bk_plugin_runtime/config/stag.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
specific language governing permissions and limitations under the License.
1212
"""
1313

14+
import os
1415
from bk_plugin_runtime.config import RUN_VER
1516

1617
if RUN_VER == "open":
@@ -23,7 +24,7 @@
2324

2425
BK_APIGW_REQUIRE_EXEMPT = os.getenv("BK_APIGW_REQUIRE_EXEMPT", None) is not None
2526

26-
default.logging_addition_settings(LOGGING)
27+
default.logging_addition_settings(LOGGING) # noqa
2728

2829
# 正式环境的日志级别可以在这里配置
2930
# V2

runtime/bk-plugin-runtime/requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ redis==2.10.5
77
django==2.2.6
88
blueapps==3.3.6rc
99
gunicorn==19.6.0
10-
blueking-component-ieod>=0.0.68
1110
djangorestframework==3.12.4
1211
drf-yasg==1.20.0
1312
raven==6.5.0

runtime/bk-plugin-runtime/setup.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
"redis==2.10.5",
3636
"blueapps==3.3.6rc",
3737
"gunicorn==19.6.0",
38-
"blueking-component-ieod>=0.0.68",
3938
"djangorestframework==3.12.4",
4039
"drf-yasg==1.20.0",
4140
"raven==6.5.0",

0 commit comments

Comments
 (0)