From b475966da6d7b8b52220b38e74f70b9876143838 Mon Sep 17 00:00:00 2001 From: Arushi Sharma Date: Sat, 5 Oct 2024 11:08:21 -0400 Subject: [PATCH] add black git hooks --- .pre-commit-config.yaml | 16 ++++++++++++++++ pyproject.toml | 14 ++++++++++++++ requirements-dev.txt | 6 ++++++ 3 files changed, 36 insertions(+) create mode 100644 .pre-commit-config.yaml create mode 100644 pyproject.toml create mode 100644 requirements-dev.txt diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..b9bef82 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,16 @@ +default_language_version: + python: python3 + +repos: + - repo: https://github.com/psf/black + rev: 22.8.0 + hooks: + - id: black + args: [--safe, --quiet] + + # - repo: https://github.com/pylint-dev/pylint + # rev: v3.2.7 + # hooks: + # - id: pylint + # args: [--disable=C0301, --jobs=4, --output-format=colorized, "--msg-template={path}:{line}: [{msg_id}({symbol}), {obj}] {msg}"] + diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..3d1abb2 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,14 @@ +[tool.black] +line-length = 88 +skip-magic-trailing-comma = true +target-version = ['py310'] +include = '\.pyi?$' +exclude = ''' +/( + \.toml + |\.sh + |\.git + |\.ini + |Dockerfile +)/ +''' \ No newline at end of file diff --git a/requirements-dev.txt b/requirements-dev.txt new file mode 100644 index 0000000..8a5a68b --- /dev/null +++ b/requirements-dev.txt @@ -0,0 +1,6 @@ +cryptoconditions==0.8.1 +pysha3==1.0.2 +python-rapidjson==1.8 +requests==2.28.1 +black==22.8.0 +pre-commit==3.8.0 \ No newline at end of file