Skip to content

Commit

Permalink
pre-commit/pytype: Use Python 3.11, create missing output dir
Browse files Browse the repository at this point in the history
Signed-off-by: Bernhard Kaindl <[email protected]>
  • Loading branch information
bernhardkaindl committed Nov 16, 2024
1 parent e5288a1 commit ae346b6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ env:
jobs:
pre-commit:
env:
SKIP: pytest,pytype,no-commit-to-branch
SKIP: pytest,no-commit-to-branch
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down
5 changes: 3 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,12 @@ repos:
hooks:
- id: pytype
name: pytype (may take up to two minutes)
entry: sh -c "pytype >/dev/tty"
#entry: sh -c "pytype >/dev/tty"
entry: pytype
types: [python]
verbose: true
language: python
language_version: python3.8
language_version: python3.11
require_serial: true
additional_dependencies:
- pytype
Expand Down
1 change: 1 addition & 0 deletions pytype_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ def setup_and_run_pytype_action(script_name: str):
# Write the panda table to a markdown output file:
summary_file = os.environ.get("GITHUB_STEP_SUMMARY", None)
if summary_file:
os.makedirs(os.path.dirname(summary_file), exist_ok=True)
with open(summary_file, "w", encoding="utf-8") as fp:
to_markdown(script_name, fp, retcode, results, filelink_baseurl)
else:
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# .github/workflows/main.yml is set up to test with 3.11, 3.12 and 3.13 in parallel.
# Therefore, use three environments: One with 3.11, one with 3.12 and one with 3.13:
#
envlist = py311-covcp-check-mdreport, py312-cov-pytype, py313-cov-lint-pyright
envlist = py311-covcp-check-pytype-mdreport, py312-cov, py313-cov-lint-pyright
isolated_build = true
skip_missing_interpreters = true
requires =
Expand Down

0 comments on commit ae346b6

Please sign in to comment.