Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fa066c8

Browse files
committed
style(format): format code
1 parent a958036 commit fa066c8

38 files changed

+277
-216
lines changed

.flake8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[flake8]
2-
max-line-length=158
2+
max-line-length=158

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,5 +116,3 @@ test.*
116116
test*
117117
node_modules
118118
temp*
119-
120-

.isort.cfg

Lines changed: 0 additions & 2 deletions
This file was deleted.

.pre-commit-config.yaml

Lines changed: 18 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,38 @@
1-
exclude: |
2-
(?x)(
3-
^alembic/|
4-
)
1+
default_language_version:
2+
python: python3
53

64
repos:
7-
- repo: https://github.com/asottile/seed-isort-config
8-
rev: v2.2.0
5+
- repo: https://github.com/commitizen-tools/commitizen
6+
rev: v2.14.2
97
hooks:
10-
- id: seed-isort-config
11-
language_version: python3.8
8+
- id: commitizen
9+
stages: [ commit-msg ]
1210

1311
- repo: https://github.com/pre-commit/pre-commit-hooks
1412
rev: v3.4.0
1513
hooks:
14+
- id: check-added-large-files
15+
- id: check-case-conflict
16+
- id: check-docstring-first
17+
- id: check-json
18+
- id: check-merge-conflict
19+
- id: check-toml
1620
- id: check-yaml
1721
- id: end-of-file-fixer
1822
- id: trailing-whitespace
19-
- id: check-byte-order-marker
20-
- id: check-merge-conflict
21-
- id: detect-private-key
22-
23+
- id: double-quote-string-fixer
2324

2425
- repo: https://github.com/timothycrosley/isort
2526
rev: 5.7.0
2627
hooks:
2728
- id: isort
28-
args: [-rc]
29-
language_version: python3.8
3029

31-
- repo: https://github.com/ambv/black
32-
rev: 20.8b1
33-
hooks:
34-
- id: black
35-
language_version: python3.8
36-
args: [--line-length=120, --skip-string-normalization]
37-
38-
- repo: https://github.com/asottile/reorder_python_imports
39-
rev: v2.3.6
40-
hooks:
41-
- id: reorder-python-imports
42-
args: [--py3-plus]
30+
# - repo: https://github.com/ambv/black
31+
# rev: 20.8b1
32+
# hooks:
33+
# - id: black
4334

4435
- repo: https://gitlab.com/pycqa/flake8
4536
rev: 3.8.4
4637
hooks:
47-
- id: flake8
38+
- id: flake8

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ up-pre:
1010
up-pack:
1111
pip freeze --local | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip install -U
1212
up-pip:
13-
pip install --upgrade pip
13+
pip install --upgrade pip

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
99
### 1.在列表,字典,集合中根据条件筛选数据
1010

11-
需求:
12-
1. 过滤 list 中大于 0 的数:[14, 0, -6, 0, -10, -8, -1, 19, -10, -16\]
11+
需求:
12+
1. 过滤 list 中大于 0 的数:[14, 0, -6, 0, -10, -8, -1, 19, -10, -16\]
1313
>
1414
2. 筛选出字典中值大于 0 的项目:{0: 9, 1: -3, 2: -8, 3: 6, 4: -4, 5: -4, 6: -7, 7: -8, 8: 7, 9: -3}
1515
>
16-
3. 筛选出集合中能被 2 整除的数:{3, 4, 9, 12, 15, 17, 19, 20}
16+
3. 筛选出集合中能被 2 整除的数:{3, 4, 9, 12, 15, 17, 19, 20}
1717
>
1818
4. 找到字典中值最小的健值对:prices = {'ACME': 45.23,'AAPL': 612.78,'IBM': 205.55,'HPQ': 37.20,'FB': 10.75}
1919
>
@@ -425,7 +425,7 @@ res_m = [func() for func in m]
425425

426426
```py
427427
# a = [1,2,3]
428-
# b = [1,3,2,4,5,6]
428+
# b = [1,3,2,4,5,6]
429429
# check if all num in a is in b, ordered
430430
# [1,2,3] is in [1,2,3,4] but [1,2,3] is not in [1,3,2,4]
431431

doc/command.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,4 @@ openssl x509 -req -in server.csr -signkey server.key -out server.crt
4444
在 Chrome 浏览器中输入 `thisisunsafe`,直接在浏览器中输入即可
4545
https://cloud.tencent.com/developer/article/1160294
4646

47-
~~缓存自动刷新(v2.2 及以前版本支持)~~
47+
~~缓存自动刷新(v2.2 及以前版本支持)~~

doc/docker.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
## docker 拷贝文件到 docker 外
22

3-
``` docker cp d7908371bcab:/home/herui/baikeNode .```
3+
``` docker cp d7908371bcab:/home/herui/baikeNode .```

doc/monitor.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464

6565
**数据存储:**
6666

67-
* mysql
67+
* mysql
6868
* prostgresq
6969

7070
**优势**
@@ -91,7 +91,7 @@
9191
* 数据传输基于 TCP 协议,Agent 节点能自动获取到系统的基础监控指标,并上报给 Transfer,Agent与Transfer建立了 TCP 长连接,每隔60秒发送一次数据到 Transfer。
9292

9393
Agent 组件直接支持 CPU、Load、内存、磁盘、IO 等指标,有第三方扩展组件可支持更多的数据采集。
94-
*
94+
*
9595
**优势:**
9696

9797
* 自动采集能力:Falcon-agent 能自动采集服务器的 200 多个基础指标(比如 CPU、内存等),无需在 Server 上做任何配置,这一点可以秒杀 Zabbix。
@@ -179,4 +179,4 @@ Agent 组件直接支持 CPU、Load、内存、磁盘、IO 等指标,有第三
179179
3. https://cloud.tencent.com/developer/article/1437971
180180
4. https://netsecurity.51cto.com/art/201905/596709.htm
181181
5. https://juejin.im/entry/6844903684082679822
182-
6. https://zhoujinl.github.io/2018/05/16/compared
182+
6. https://zhoujinl.github.io/2018/05/16/compared

doc/pyspark.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,4 @@ new_df = df.groupby("lemma_id").agg(collect_list('data').alias('data'), collect_
6161

6262
```py
6363
df.write.format("orc").save("file:////home/herui/baikeNode/nodes.orc")
64-
```
64+
```

0 commit comments

Comments
 (0)