Skip to content

Commit dc0e801

Browse files
committed
move lint exceptions to project file so contributors can follow same conventions
1 parent f97e3a2 commit dc0e801

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

.flake8

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[flake8]
2+
ignore =
3+
E111,
4+
E114,
5+
E121,
6+
E501
7+
8+
# You can add project-wide settings here later, e.g.:
9+
# max-line-length = 120
10+
# exclude = .git,__pycache__,.venv

.github/workflows/python.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ jobs:
1515
- name: Lint
1616
run: |
1717
pip install flake8
18-
flake8 --ignore E111,E114,E121,E501 zhook.py
18+
flake8 --config ./.flake8 ./zhook.py

zhook.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -416,9 +416,9 @@ def generate_json_schema(obj, max_depth=10, current_depth=0):
416416
def _safe_hint(s):
417417
if s is None:
418418
return "<none>"
419-
l = len(s)
419+
hint_len = len(s)
420420
head = s[:8].replace('\n', ' ')
421-
return f"len={l}, startswith='{head}...'"
421+
return f"len={hint_len}, startswith='{head}...'"
422422

423423
try:
424424
zitiIdJson = json.loads(zitiId)

0 commit comments

Comments
 (0)