Skip to content

Commit

Permalink
Fix typing (#986)
Browse files Browse the repository at this point in the history
* typing fixes

* typing fixes

* typing fixes

* typing fixes

* typing fixes

* typing fixes

* typing fixes

* typing fixes

* typing fixes

* typing fixes

* typing fixes in CI

* typing fixes in CI

* typing fixes in CI

* typing fixes in CI

* typing fixes in CI

* typing fixes in CI

* typing fixes

* typing fixes
  • Loading branch information
davorrunje authored Feb 17, 2025
1 parent 06224ef commit 50f5c2d
Show file tree
Hide file tree
Showing 100 changed files with 709 additions and 552 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-integration.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow will install Python dependencies and run tests with Python 3.11
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Test integration
name: Integration tests

on:
schedule:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/test-with-optional-deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ jobs:
- "interop"
- "crawl4ai"
- "docs"
- "interop-crewai"
- "interop-langchain"
- "interop-pydantic-ai"
os: [ubuntu-latest, macos-latest, windows-latest]
# Run tests only for py versions 3.9, 3.10, 3.13
python-version: ["3.9", "3.10", "3.13"]
Expand Down
55 changes: 50 additions & 5 deletions .github/workflows/type-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ name: Type check
# see: https://help.github.com/en/actions/reference/events-that-trigger-workflows
on: # Trigger the workflow on pull request or merge
pull_request:
merge_group:
types: [checks_requested]
push:
branches:
- main

defaults:
run:
Expand All @@ -13,9 +14,50 @@ permissions: {}
jobs:
type-check:
strategy:
fail-fast: true
fail-fast: false
matrix:
version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
optional-dependencies:
- "none"
# LLMs
- "openai"
- "gemini"
- "anthropic"
- "deepseek"
# optional dependencies
- "browser-use"
- "commsagent-discord"
- "commsagent-slack"
- "commsagent-telegram"
- "jupyter-executor"
- "retrievechat"
- "retrievechat-pgvector"
- "retrievechat-mongodb"
- "retrievechat-qdrant"
- "graph-rag-falkor-db"
# - "neo4j" # Separate test exists at contrib-graph-rag-tests.yml
- "twilio"
- "interop"
- "crawl4ai"
- "docs"
- "interop-crewai"
- "interop-langchain"
- "interop-pydantic-ai"
exclude:
# pdoc3 is failing in python 3.9 for some reason, we build docs with Python 3.10
- python-version: "3.9"
optional-dependencies: "docs"
# graphrag_sdk uses pipe(|) in signature which is unsupported in python 3.9
- python-version: "3.9"
optional-dependencies: "graph-rag-falkor-db"
# Issues with installing retrievechat-qdrant in python 3.13
- python-version: "3.13"
optional-dependencies: "retrievechat-qdrant"
# Browser use doesn't support below python 3.11
- python-version: "3.9"
optional-dependencies: "browser-use"
- python-version: "3.10"
optional-dependencies: "browser-use"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -24,9 +66,12 @@ jobs:
version: "latest"
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.version }}
python-version: ${{ matrix.python-version }}
# All additional modules should be defined in pyproject.toml
- run: uv pip install --system ".[types]"
if: matrix.optional-dependencies == 'none'
- run: uv pip install --system ".[types, ${{ matrix.optional-dependencies }}]"
if: matrix.optional-dependencies != 'none'
# Any additional configuration should be defined in pyproject.toml
- run: |
mypy
36 changes: 18 additions & 18 deletions .secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
"filename": "autogen/agentchat/contrib/vectordb/pgvectordb.py",
"hashed_secret": "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8",
"is_verified": false,
"line_number": 568,
"line_number": 580,
"is_secret": false
}
],
Expand Down Expand Up @@ -2535,127 +2535,127 @@
"filename": "test/oai/test_utils.py",
"hashed_secret": "f72c85879027f6160ce36e1c5074ef8207bfe105",
"is_verified": false,
"line_number": 25,
"line_number": 26,
"is_secret": false
},
{
"type": "Secret Keyword",
"filename": "test/oai/test_utils.py",
"hashed_secret": "4c88039c5079180dacb0e29d715055d95b2b7589",
"is_verified": false,
"line_number": 34,
"line_number": 35,
"is_secret": false
},
{
"type": "Secret Keyword",
"filename": "test/oai/test_utils.py",
"hashed_secret": "7460e665be1988cc62f1caf9d47716b07d55858c",
"is_verified": false,
"line_number": 64,
"line_number": 65,
"is_secret": false
},
{
"type": "Secret Keyword",
"filename": "test/oai/test_utils.py",
"hashed_secret": "b5c2827eb65bf13b87130e7e3c424ba9ff07cd67",
"is_verified": false,
"line_number": 71,
"line_number": 72,
"is_secret": false
},
{
"type": "Secret Keyword",
"filename": "test/oai/test_utils.py",
"hashed_secret": "178c7a21b087dfafc826a21b61aff284c71fd258",
"is_verified": false,
"line_number": 197,
"line_number": 198,
"is_secret": false
},
{
"type": "Secret Keyword",
"filename": "test/oai/test_utils.py",
"hashed_secret": "aa5c90e1b80bb987f562ac30eaa1a71c832892f5",
"is_verified": false,
"line_number": 198,
"line_number": 199,
"is_secret": false
},
{
"type": "Secret Keyword",
"filename": "test/oai/test_utils.py",
"hashed_secret": "4489f55309f29853a4075cbbdf1f18b584809726",
"is_verified": false,
"line_number": 200,
"line_number": 201,
"is_secret": false
},
{
"type": "Secret Keyword",
"filename": "test/oai/test_utils.py",
"hashed_secret": "95cfb33d5e102631e226e7ff9da4b17d6ba5f3e4",
"is_verified": false,
"line_number": 212,
"line_number": 213,
"is_secret": false
},
{
"type": "Secret Keyword",
"filename": "test/oai/test_utils.py",
"hashed_secret": "7943297a6a2188abe697bd1e0189fdd1274818be",
"is_verified": false,
"line_number": 214,
"line_number": 215,
"is_secret": false
},
{
"type": "Secret Keyword",
"filename": "test/oai/test_utils.py",
"hashed_secret": "8cc86c45479a8e0bbb1ddea57d3e195b611241f2",
"is_verified": false,
"line_number": 234,
"line_number": 235,
"is_secret": false
},
{
"type": "Secret Keyword",
"filename": "test/oai/test_utils.py",
"hashed_secret": "eda6571eea7bd0ac4553ac9d745631f1f2bec7a4",
"is_verified": false,
"line_number": 236,
"line_number": 237,
"is_secret": false
},
{
"type": "Secret Keyword",
"filename": "test/oai/test_utils.py",
"hashed_secret": "0ad02c88ffd9754bfbfc24ade0bf8bc48d76b232",
"is_verified": false,
"line_number": 245,
"line_number": 246,
"is_secret": false
},
{
"type": "Secret Keyword",
"filename": "test/oai/test_utils.py",
"hashed_secret": "11841233da3f9f37c5fa14e8b482dde913db6edf",
"is_verified": false,
"line_number": 253,
"line_number": 254,
"is_secret": false
},
{
"type": "Base64 High Entropy String",
"filename": "test/oai/test_utils.py",
"hashed_secret": "11cac88cbfa53881646b024097f531c4f234151b",
"is_verified": false,
"line_number": 431,
"line_number": 432,
"is_secret": false
},
{
"type": "OpenAI Token",
"filename": "test/oai/test_utils.py",
"hashed_secret": "8e8324e8ea2ec13efb774680c6e3850625e575e6",
"is_verified": false,
"line_number": 431,
"line_number": 432,
"is_secret": false
},
{
"type": "Base64 High Entropy String",
"filename": "test/oai/test_utils.py",
"hashed_secret": "8e2fa04ab430ff4817e87e3294f33727fc78ed6c",
"is_verified": false,
"line_number": 434,
"line_number": 435,
"is_secret": false
}
],
Expand Down Expand Up @@ -3116,5 +3116,5 @@
}
]
},
"generated_at": "2025-02-13T09:44:19Z"
"generated_at": "2025-02-17T05:30:20Z"
}
Loading

0 comments on commit 50f5c2d

Please sign in to comment.