Skip to content

Commit

Permalink
Add pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
wsxiaoys committed Mar 16, 2023
1 parent a5b4425 commit e24155f
Show file tree
Hide file tree
Showing 5 changed files with 130 additions and 102 deletions.
20 changes: 20 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
stages: [push]
- repo: https://github.com/psf/black
rev: 22.10.0
hooks:
- id: black
stages: [push]
2 changes: 0 additions & 2 deletions Makefile

This file was deleted.

201 changes: 106 additions & 95 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions preprocess/preprocess_project.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import os
import glob
import json

from datasets import Dataset
from transformers import HfArgumentParser
import os

import metrics
from args import PreprocessProjectArgs
from datasets import Dataset
from transformers import HfArgumentParser


def parse_args():
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ transformers = "^4.27.1"


[tool.poetry.group.dev.dependencies]
black = "^23.1.0"
pre-commit = "^3.1.1"

[build-system]
requires = ["poetry-core"]
Expand Down

0 comments on commit e24155f

Please sign in to comment.