diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index ee5ec191..00000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: Run linters -on: - pull_request: - branches: - - main - -jobs: - lint: - runs-on: ubuntu-latest - if: github.actor != 'dependabot[bot]' && github.actor != 'dependabot' && github.event.pull_request.head.repo.owner.login == github.repository_owner - strategy: - matrix: - python-version: [3.6, 3.7, 3.8, 3.9] - - steps: - - uses: actions/checkout@v3.1.0 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - uses: actions/cache@v3.0.11 - id: pip-cache - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('requirements.txt') }} - restore-keys: | - ${{ runner.os }}-pip-${{ matrix.python-version }}- - - name: Install dependencies - run: | - pip install -U pip - pip install flake8==3.8.4 - - name: Install black - run: pip install black - - name: Run Lint - uses: wearerequired/lint-action@v2.1.0 - with: - github_token: ${{ secrets.github_token }} - black: true - flake8: true - git_email: "github-action[bot]@github.com" - auto_fix: true diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9445dcc8..deff4ce7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -24,3 +24,14 @@ repos: hooks: - id: black language_version: python3 + + - repo: https://github.com/adrienverge/yamllint.git + rev: v1.17.0 + hooks: + - id: yamllint + args: ["-d", "relaxed"] + + - repo: https://github.com/pycqa/flake8 + rev: 5.0.4 + hooks: + - id: flake8 diff --git a/README.md b/README.md index 68a8a55c..4a63c9ed 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,7 @@ class MyModel(models.Model): ```python from django.db import models -from model_clone import CloneModel +from model_clone.models import CloneModel class MyModel(CloneModel): title = models.CharField(max_length=200) @@ -79,7 +79,7 @@ class MyModel(CloneModel): ```python from django.db import models from django.utils.translation import gettext_lazy as _ -from model_clone import CloneModel +from model_clone.models import CloneModel class TestModel(CloneModel): title = models.CharField(max_length=200)