Skip to content

Commit a09b283

Browse files
authored
chore: Update plugin sources to address issue with ruff (#35)
* chore: Trunk configs * fix: Trunk's mypy environment missing deps * chore: Add comment * chore: Utilize system linters for some * chore: Fix workflow permissions * refactor: Move trunk check to separate job * chore: Add .vale.ini config * feat: Cache Trunk * feat: Update trunk workflows * feat: Enable workflow_dispatch for cache-trunk * feat: Trunk check_mode all for daily check * debug: Test cron * debug: Remove test cron * debug: Remove test cron * fix: Trunk's mypy incremental cache issue * chore: Update plugin sources to address issue with ruff * chore: Fix formatting * debug: Issue reading 'github.event.workflow_run.id' * chore: Fix formatting * debug: Issue reading 'github.event.workflow_run.id' * debug: Issue reading 'github.event.workflow_run.id' * debug: Issue reading 'github.event.workflow_run.id' * debug: Issue reading 'github.event.workflow_run.id' * debug: Issue reading 'github.event.workflow_run.id' * debug: Issue reading 'github.event.workflow_run.id' * debug: Issue reading 'github.event.workflow_run.id' * fix: Issue with comma due to misuse of post-annotations flag * chore: Add comments * chore: Fix formatting
1 parent 85bc639 commit a09b283

File tree

2 files changed

+24
-18
lines changed

2 files changed

+24
-18
lines changed

.github/workflows/cicd.yml

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: CI/CD pipeline
22

33
on:
4-
workflow_dispatch: # Add this line to enable manual triggering
4+
workflow_dispatch: # Add this line to enable manual triggering
55
pull_request:
66
branches:
77
- main
@@ -49,20 +49,19 @@ jobs:
4949
needs:
5050
- release
5151
permissions:
52-
id-token: write # IMPORTANT: mandatory for trusted publishing
52+
id-token: write # IMPORTANT: mandatory for trusted publishing
5353

5454
environment:
5555
name: testpypi
5656
url: ${{ format('https://test.pypi.org/p/{0}', 'django2pydantic') }}
5757

5858
steps:
59-
- name: Download all the dists
60-
uses: actions/download-artifact@v4
61-
with:
62-
name: python-package-distributions
63-
path: dist/
64-
- name: Publish distribution 📦 to TestPyPI
65-
uses: pypa/gh-action-pypi-publish@release/v1
66-
with:
67-
repository-url: https://test.pypi.org/legacy/
68-
59+
- name: Download all the dists
60+
uses: actions/download-artifact@v4
61+
with:
62+
name: python-package-distributions
63+
path: dist/
64+
- name: Publish distribution 📦 to TestPyPI
65+
uses: pypa/gh-action-pypi-publish@release/v1
66+
with:
67+
repository-url: https://test.pypi.org/legacy/

.trunk/trunk.yaml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ cli:
44
plugins:
55
sources:
66
- id: trunk
7-
ref: 38234efbcb43bd30fa4d48b206f8fb6686925595
7+
ref: 1aefea45fa91485f53837b51d705f115070c83e1
88
uri: https://github.com/NextGenContributions/plugins
99
runtimes:
1010
enabled:
@@ -18,16 +18,23 @@ lint:
1818
definitions:
1919
- name: mypy
2020
commands:
21-
- name: lint
22-
run:
23-
mypy --no-incremental --ignore-missing-imports --follow-imports=silent --show-error-codes
24-
--show-column-numbers ${target}
21+
- name: lint
22+
run:
23+
# Override mypy default command by adding '--no-incremental' flag, which is
24+
# needed to handle "AssertionError: Internal error: method must be called
25+
# on parsed file only" during trunk check run
26+
# Refs:
27+
# - https://github.com/python/mypy/issues/14521
28+
# - https://mypy.readthedocs.io/en/stable/command_line.html#incremental
29+
mypy --no-incremental --ignore-missing-imports --follow-imports=silent --show-error-codes
30+
--show-column-numbers ${target}
2531
enabled:
2632
- actionlint@1.7.7
2733
- bandit@1.8.3
2834
- checkov@3.2.379
2935
- codespell@2.4.1
30-
- cspell@8.17.5
36+
# Temporarily disabled until we have better solution for unknown words
37+
# - cspell@8.17.5
3138
- djlint@1.36.4
3239
- flake8
3340
- git-diff-check

0 commit comments

Comments
 (0)