Skip to content

Commit

Permalink
[ISSUE-#32] chore: add pre-commit, isort, yapf
Browse files Browse the repository at this point in the history
  • Loading branch information
stu01509 committed Aug 21, 2023
1 parent ebe3ac4 commit bfad881
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 2 deletions.
32 changes: 32 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: trailing-whitespace
- id: check-added-large-files
- id: check-ast
- id: check-case-conflict
- id: check-json
- id: check-toml
- id: check-yaml
- id: end-of-file-fixer

- repo: https://github.com/PyCQA/flake8
rev: 5.0.4
hooks:
- id: flake8
args:
- --max-line-length=160
- repo: https://github.com/PyCQA/isort
rev: 5.11.5
hooks:
- id: isort
args:
- --line-length=160
- repo: https://github.com/pre-commit/mirrors-yapf
rev: v0.32.0
hooks:
- id: yapf
args:
- column_limit = 160
additional_dependencies: [toml]
5 changes: 3 additions & 2 deletions TaiwanLottery/utils.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# -*- coding: utf-8 -*-
import datetime
import math
import logging
import json
import logging
import math

from terminaltables import AsciiTable


Expand Down
Binary file modified requirements.txt
Binary file not shown.
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ testing =
pytest>=7.0
pytest-cov>=4.0
flake8>=6.0
pre-commit>=3.3

[flake8]
max-line-length = 160
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"pytest>=7.0",
"pytest-cov>=4.0",
"flake8>=6.0",
"pre-commit>=3.3"
],
keywords=['python', 'taiwanlottery', 'crawler', 'lottery', 'taiwan', '台灣彩券', '樂透', '彩券'],
classifiers=[
Expand Down

0 comments on commit bfad881

Please sign in to comment.