Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AM - 542: Add custom pre-commit hook #138

Merged
merged 6 commits into from
Oct 11, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 18 additions & 0 deletions .git-hooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash
# Setup the pre-commit symlink as `ln -s ../../.git-hooks/pre-commit .git/hooks/pre-commit`

while :
do
echo "Running pre-commit hook"
# Run the pre-commit hook
pre-commit run -a

# Check if there are any changes
if git diff --quiet; then
echo "No changes after running pre-commit."
break # Exit the loop if there are no changes
else
# Stage the changes
git add .
ErnestoLoma marked this conversation as resolved.
Show resolved Hide resolved
fi
done
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ repos:
- id: trailing-whitespace
- id: debug-statements

- repo: https://github.com/PyCQA/autoflake
rev: v2.2.1
hooks:
- id: autoflake
args: [--ignore-init-module-imports, --remove-all-unused-imports, --remove-unused-variables, --in-place]
language_version: python3

- repo: https://github.com/pycqa/flake8
rev: 5.0.4
hooks:
Expand Down
1 change: 0 additions & 1 deletion pyatlan/client/atlan.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,6 @@ def _get_next_page(self):
Abstract method that must be implemented in subclasses, used to
fetch the next page of results.
"""
pass

# TODO Rename this here and in `next_page`
def _get_next_page_json(self):
Expand Down