Skip to content

Commit 9946bba

Browse files
authored
Add pre-commit (anvilco#17)
* Add pre-commit * Add basic pre-commit * precommit fixes
1 parent 6877018 commit 9946bba

15 files changed

Lines changed: 111 additions & 23 deletions

File tree

.pre-commit-config.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v2.3.0
4+
hooks:
5+
- id: check-yaml
6+
- id: end-of-file-fixer
7+
- id: trailing-whitespace
8+
- repo: https://github.com/psf/black
9+
rev: 21.9b0
10+
hooks:
11+
- id: black

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,4 @@
4343
- Added other requests
4444
- Fill PDF
4545
- Generate PDF
46-
- Download Documents
46+
- Download Documents

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ written in the Python programming language.
88

99
Anvil is a suite of tools for integrating document-based workflows and PDFs within your application:
1010

11-
1. Anvil Workflows converts your PDF forms into simple, intuitive websites that
11+
1. Anvil Workflows converts your PDF forms into simple, intuitive websites that
1212
fill the PDFs and gather signatures for you.
1313
2. Anvil PDF Filling API allows you to fill any PDF with JSON data.
1414
3. Anvil PDF Generation API allows you to create new PDFs.
@@ -39,4 +39,3 @@ or add it to your [Poetry](https://python-poetry.org/) project:
3939
```text
4040
$ poetry add python-anvil
4141
```
42-

bin/verchew

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,15 @@ def main():
123123

124124

125125
def parse_args():
126-
parser = argparse.ArgumentParser(description="System dependency version checker.",)
126+
parser = argparse.ArgumentParser(
127+
description="System dependency version checker.",
128+
)
127129

128130
version = "%(prog)s v" + __version__
129131
parser.add_argument(
130-
'--version', action='version', version=version,
132+
'--version',
133+
action='version',
134+
version=version,
131135
)
132136
parser.add_argument(
133137
'-r', '--root', metavar='PATH', help="specify a custom project root directory"

docs/advanced.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,4 +98,4 @@ packet.add_file_payloads("fileAlias", FillPDFPayload(data={
9898
}))
9999

100100
anvil.create_etch_packet(payload=packet)
101-
```
101+
```

docs/api_usage.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ Data to embed into the PDF. Supported `payload` types are:
9090

9191
Queries the GraphQL API and returns a list of available casts.
9292

93-
By default, this will retrieve the `'eid', 'title', 'fieldInfo'` fields for the
93+
By default, this will retrieve the `'eid', 'title', 'fieldInfo'` fields for the
9494
casts, but this can be changed with the `fields` argument.
9595

9696
* `fields` - (Optional) list of fields to return for each Cast
@@ -114,14 +114,14 @@ Fetching the welds is the best way to fetch the data submitted to a given workfl
114114

115115
### Anvil.get_current_user
116116

117-
Returns the currently logged in user. You can generally get a lot of what you
117+
Returns the currently logged in user. You can generally get a lot of what you
118118
may need from this query.
119119

120120
### Anvil.download_documents
121121

122-
Retrieves zip file data from the API with a given docoument eid.
122+
Retrieves zip file data from the API with a given docoument eid.
123123

124-
When all parties have signed an Etch Packet, you can fetch the completed
124+
When all parties have signed an Etch Packet, you can fetch the completed
125125
documents in zip form with this API call.
126126

127127
* `document_group_eid` - The eid of the document group you wish to download.
@@ -130,8 +130,8 @@ documents in zip form with this API call.
130130

131131
Generates a signing URL for a given signature process.
132132

133-
By default, we will solicit all signatures via email. However, if you'd like
134-
to embed the signature process into one of your own flows we support this as
133+
By default, we will solicit all signatures via email. However, if you'd like
134+
to embed the signature process into one of your own flows we support this as
135135
well.
136136

137137
* `signer_eid` - eid of the signer. This can be found in the response of the
@@ -184,4 +184,4 @@ headers = res["headers"]
184184

185185
# No headers
186186
res = anvil.fill_pdf("some_template_id", payload, include_headers=False)
187-
```
187+
```

docs/cli_usage.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ In general, adding `--help` after a command will display more information on how
1414
```shell
1515
# The CLI commands will use the environment variable "ANVIL_API_KEY" for all
1616
# Anvil API requests.
17-
$ ANVIL_API_KEY=MY_GENERATED_KEY anvil
17+
$ ANVIL_API_KEY=MY_GENERATED_KEY anvil
1818
Usage: anvil [OPTIONS] COMMAND [ARGS]...
1919

2020
Options:
@@ -42,4 +42,3 @@ Options:
4242
-i, --input TEXT Filename of input CSV that provides data [required]
4343
--help Show this message and exit.
4444
```
45-

examples/create_etch_existing_cast.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def main():
6767
# URL of where the signer will be redirected after signing.
6868
# The URL will also have certain URL params added on, so the page
6969
# can be customized based on the signing action.
70-
redirect_url="https://www.google.com"
70+
redirect_url="https://www.google.com",
7171
)
7272

7373
# Add your signer.

poetry.lock

Lines changed: 62 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ pync = { version = "*", platform = "darwin" }
8080
ipython = "^7.12.0"
8181
pyinotify = {version = "^0.9.6", optional = true}
8282
tox = "^3.21.2"
83+
pre-commit = "^2.15.0"
8384

8485
[tool.poetry.scripts]
8586

0 commit comments

Comments
 (0)