Skip to content

Commit

Permalink
Add pre commit hooks (MrPowers#14)
Browse files Browse the repository at this point in the history
* chore: add pre commit hooks
  • Loading branch information
robertkossendey authored Dec 20, 2022
1 parent 2bfab0d commit 33c47c1
Show file tree
Hide file tree
Showing 5 changed files with 229 additions and 86 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ tmp/
__pycache__/
*.py[cod]

.pytest_cache/
.pytest_cache/
30 changes: 30 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: check-added-large-files
- id: check-ast
- id: check-byte-order-marker
- id: check-case-conflict
- id: check-docstring-first
- id: check-executables-have-shebangs
- id: check-json
- id: check-merge-conflict
- id: check-toml
- id: check-yaml
- id: debug-statements
- id: detect-aws-credentials
- id: detect-private-key
- id: end-of-file-fixer
- id: requirements-txt-fixer
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 22.12.0
hooks:
- id: black
language_version: python3.9
- repo: https://github.com/pycqa/flake8
rev: 6.0.0
hooks:
- id: flake8
additional_dependencies: [flake8-bugbear, Flake8-pyproject]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@ Here's how to perform the copy:
mack.copy_table(delta_table=deltaTable, target_path=path)
```


## Append data without duplicates

The `append_without_duplicates` function helps to append records to a existing Delta table without getting duplicates appended to the record.
Expand Down Expand Up @@ -200,6 +199,7 @@ mack.append_without_duplicates(deltaTable, append_df, ["col1"])

Here's the ending result:
```
+----+----+----+
|col1|col2|col3|
+----+----+----+
Expand Down
Loading

0 comments on commit 33c47c1

Please sign in to comment.