Skip to content

Commit 9379f4e

Browse files
authored
Merge pull request #1270 from dbcli/RW/add-limited-mypy-to-ci
Add type checking to CI
2 parents 8fd9b7c + 28777e1 commit 9379f4e

62 files changed

Lines changed: 185 additions & 11 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/typecheck.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: lint
2+
3+
on:
4+
pull_request:
5+
paths-ignore:
6+
- '**.md'
7+
- 'AUTHORS'
8+
9+
jobs:
10+
linters:
11+
name: Typecheck
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Check out Git repository
16+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
17+
18+
- name: Set up Python
19+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
20+
with:
21+
python-version: '3.13'
22+
23+
- uses: astral-sh/setup-uv@7edac99f961f18b581bbd960d59d049f04c0002f # v6.4.1
24+
with:
25+
version: 'latest'
26+
27+
- name: Install dependencies
28+
run: uv sync --all-extras
29+
30+
- name: Run mypy
31+
run: |
32+
uv run --no-sync --frozen -- python -m mypy --no-pretty --install-types .

changelog.md

Lines changed: 9 additions & 0 deletions

mycli/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# type: ignore
2+
13
import importlib.metadata
24

35
__version__ = importlib.metadata.version("mycli")

mycli/clibuffer.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# type: ignore
2+
13
from prompt_toolkit.application import get_app
24
from prompt_toolkit.enums import DEFAULT_BUFFER
35
from prompt_toolkit.filters import Condition

mycli/clistyle.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# type: ignore
2+
13
import logging
24

35
from prompt_toolkit.styles import Style, merge_styles

mycli/clitoolbar.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# type: ignore
2+
13
from prompt_toolkit.application import get_app
24
from prompt_toolkit.enums import EditingMode
35
from prompt_toolkit.key_binding.vi_state import InputMode

mycli/compat.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# type: ignore
2+
13
"""Platform and Python version compatibility support."""
24

35
import sys

mycli/completion_refresher.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# type: ignore
2+
13
from collections import OrderedDict
24
import threading
35

mycli/config.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# type: ignore
2+
13
from copy import copy
24
from importlib import resources
35
from io import BytesIO, TextIOWrapper

mycli/key_bindings.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# type: ignore
2+
13
import logging
24

35
from prompt_toolkit.enums import EditingMode

0 commit comments

Comments
 (0)