Skip to content

Commit

Permalink
Update mypy run_from to respect nested setups (#570)
Browse files Browse the repository at this point in the history
Multi-language repos that do not include `pyproject.toml` at their
workspace root will require mypy to respect their relevant configs. This
uses the new `run_from` key to support this, and we can roll this out
for other linters as needed.

Will require a CLI version (and required version) bump once the relevant
changes are released.
  • Loading branch information
TylerJang27 authored and pat-trunk-io committed Jan 22, 2024
1 parent e392c43 commit 68c921b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .trunk/trunk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 0.1

# version used for local trunk runs and testing
cli:
version: 1.17.3-beta.15
version: 1.18.0

api:
address: api.trunk-staging.io:8443
Expand Down
1 change: 1 addition & 0 deletions linters/mypy/plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ lint:
run:
mypy --ignore-missing-imports --follow-imports=silent --show-error-codes
--show-column-numbers ${target}
run_from: ${root_or_parent_with_any_config}
success_codes: [0, 1]
stdin: false
tools: [mypy]
Expand Down
2 changes: 1 addition & 1 deletion plugin.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: 0.1
# IfChange
required_trunk_version: ">=1.17.3-beta.5"
required_trunk_version: ">=1.18.0"
# ThenChange tests/repo_tests/config_check.test.ts

environments:
Expand Down
2 changes: 1 addition & 1 deletion tests/repo_tests/config_check.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe("Global config health check", () => {
setupTrunk: true,
// NOTE: This version should be kept compatible in lockstep with the `required_trunk_version` in plugin.yaml
// IfChange
trunkVersion: "1.17.3-beta.5",
trunkVersion: "1.18.0",
// ThenChange plugin.yaml
});

Expand Down

0 comments on commit 68c921b

Please sign in to comment.