Skip to content

Commit 15e8146

Browse files
committed
fix: complete type annotations and strict type checking after rebase
- Regenerate protobuf files with mypy type stubs (.pyi files) - Add TYPE_CHECKING imports to fix forward reference issues - Fix import ordering to comply with ruff E402 requirements - Update pyproject.toml: * Add ruff exclude for notebooks and embeddings examples * Remove mypy_protobuf.main plugin (stubs generated separately) * Update mypy exclude configuration - Move module docstrings before __future__ imports per PEP 8 - Ensure all type annotations pass strict mypy checks - All tests passing (91/91) Resolves type checking issues after merging main branch changes.
1 parent 4b42217 commit 15e8146

38 files changed

+20354
-18996
lines changed

.github/renovate.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
{
22
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3-
"extends": ["local>dgraph-io/renovate-config"],
3+
"extends": [
4+
"local>dgraph-io/renovate-config"
5+
],
46
"rangeStrategy": "widen"
57
}

.github/workflows/cd-pydgraph.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
name: cd-pydgraph
2-
32
on:
43
workflow_dispatch:
54
inputs:
65
releasetag:
76
description: releasetag
87
required: true
98
type: string
10-
119
permissions:
1210
contents: read
13-
1411
jobs:
1512
pydgraph-build:
1613
runs-on: ubuntu-latest
@@ -38,6 +35,4 @@ jobs:
3835
# build binary wheel and a source tarball
3936
python -m build
4037
- name: Upload to PyPi
41-
run:
42-
twine upload --username ${{ secrets.DGRAPH_PYPI_USERNAME }} --password ${{
43-
secrets.DGRAPH_PYPI_PASSWORD }} dist/*
38+
run: twine upload --username ${{ secrets.DGRAPH_PYPI_USERNAME }} --password ${{ secrets.DGRAPH_PYPI_PASSWORD }} dist/*

.github/workflows/ci-pydgraph-tests.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
name: ci-pydgraph-tests
2-
32
on:
43
push:
54
branches:
@@ -14,10 +13,8 @@ on:
1413
- main
1514
schedule:
1615
- cron: 1 0 * * * # run workflow daily
17-
1816
permissions:
1917
contents: read
20-
2118
jobs:
2219
pydgraph-tests:
2320
runs-on: ubuntu-latest
@@ -41,8 +38,7 @@ jobs:
4138
python -m pip install --upgrade pip
4239
python -m pip install .[dev]
4340
- name: Verify that updated protobufs are checked in
44-
if: ${{ matrix.python-version == '3.9' || matrix.python-version == '3.10' ||
45-
matrix.python-version == '3.11' || matrix.python-version == '3.12' }} # Skip for Python 3.13+ due to grpcio-tools compatibility
41+
if: ${{ matrix.python-version == '3.9' || matrix.python-version == '3.10' || matrix.python-version == '3.11' || matrix.python-version == '3.12' }} # Skip for Python 3.13+ due to grpcio-tools compatibility
4642
run: |
4743
cd pydgraph
4844
python scripts/protogen.py

.github/workflows/trunk.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@ name: Trunk Code Quality
22
on:
33
pull_request:
44
branches: main
5-
65
permissions:
76
contents: read
87
actions: write
98
checks: write
10-
119
jobs:
1210
trunk-code-quality:
1311
name: Trunk Code Quality

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ repos:
6060
rev: v1.18.2
6161
hooks:
6262
- id: mypy
63-
exclude: ^pydgraph/proto/
63+
exclude: ^(pydgraph/proto/|examples/embeddings/)
6464
args:
6565
- "--config-file=pyproject.toml"
6666
additional_dependencies:

.trunk/configs/.markdownlint.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
{
2-
"line-length": { "line_length": 150, "tables": false },
3-
"no-inline-html": false,
2+
"first-line-heading": false,
3+
"line-length": {
4+
"line_length": 150,
5+
"tables": false
6+
},
47
"no-bare-urls": false,
5-
"no-space-in-emphasis": false,
68
"no-emphasis-as-heading": false,
7-
"first-line-heading": false
9+
"no-inline-html": false,
10+
"no-space-in-emphasis": false
811
}

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,4 +173,4 @@
173173
incurred by, or claims asserted against, such Contributor by reason
174174
of your accepting any such warranty or additional liability.
175175

176-
END OF TERMS AND CONDITIONS
176+
END OF TERMS AND CONDITIONS

0 commit comments

Comments
 (0)