From f2ba0a4aa9949f6b30d60f4f7fef232021fabe4c Mon Sep 17 00:00:00 2001 From: Jeff Yang Date: Sat, 24 Oct 2020 19:10:47 +0630 Subject: [PATCH 1/3] Update setup.cfg --- setup.cfg | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setup.cfg b/setup.cfg index 00608f0487c0..cae9c5153343 100644 --- a/setup.cfg +++ b/setup.cfg @@ -28,3 +28,5 @@ markers = distributed: mark a test with distributed option multinode_distributed: mark a test with multi-node distributed option tpu: mark a test as requiring XLA +addopts = + --color=yes From e4682cbeb72770a8ba69fa71bf1946af25c9906e Mon Sep 17 00:00:00 2001 From: ydcjeff Date: Sun, 15 Nov 2020 18:21:23 +0630 Subject: [PATCH 2/3] [pre-commit] setup yaml in pre-commit hook --- .pre-commit-config.yaml | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f25aa11b8130..504702e6328b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,23 +1,31 @@ repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v2.3.0 + hooks: + - id: check-toml + - id: check-yaml + - id: end-of-file-fixer + - id: trailing-whitespace + - repo: https://github.com/asottile/seed-isort-config rev: v1.9.4 hooks: - - id: seed-isort-config - args: [--exclude=^((examples|docs)/.*)$] + - id: seed-isort-config + args: [--exclude=^((examples|docs)/.*)$] - repo: https://github.com/timothycrosley/isort rev: 4.3.21-2 hooks: - - id: isort + - id: isort - repo: https://github.com/python/black rev: 19.10b0 hooks: - - id: black - language_version: python3.7 + - id: black + language_version: python3.7 - repo: https://gitlab.com/pycqa/flake8 rev: 3.7.7 hooks: - - id: flake8 - args: [--append-config=tox.ini] + - id: flake8 + args: [--append-config=tox.ini] From 6c537e92e601c9312b72eb1735fecdf8da3d6f6c Mon Sep 17 00:00:00 2001 From: ydcjeff Date: Sun, 15 Nov 2020 18:25:25 +0630 Subject: [PATCH 3/3] [pre-commit] setup toml prettier --- .pre-commit-config.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 504702e6328b..3db1bd9187a8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,6 +7,11 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace + - repo: https://github.com/prettier/pre-commit + rev: main + hooks: + - id: prettier + - repo: https://github.com/asottile/seed-isort-config rev: v1.9.4 hooks: