Skip to content

Commit

Permalink
Update stubs to 0.20.11
Browse files Browse the repository at this point in the history
  • Loading branch information
vemel committed Jun 6, 2024
1 parent ea92e3d commit c3ed8cc
Show file tree
Hide file tree
Showing 8 changed files with 186 additions and 281 deletions.
16 changes: 4 additions & 12 deletions .github/workflows/on_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,29 +33,21 @@ jobs:
with:
python-version: ${{ matrix.version }}
cache: "poetry"
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install dependencies
run: |
poetry install -n
- name: Install missing dependencies
run: |
poetry run pip install flake8 mypy
- name: Install Node.js dependencies
run: |
npm install -g pyright
poetry run pip install mypy
- name: Lint
run: |
poetry run flake8 awscrt-stubs
poetry run npx pyright awscrt-stubs
poetry run pyright
poetry run ruff check
poetry run mypy awscrt-stubs
- name: Check formatting
if: ${{ matrix.check-formatting }}
run: |
poetry run black --check awscrt-stubs
poetry run isort -c awscrt-stubs
poetry run ruff format --check
- name: Stubs consistency check
if: ${{ matrix.check-consistency }}
run: |
Expand Down
5 changes: 1 addition & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
{
"[python]": {
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": "explicit"
},
"editor.defaultFormatter": "ms-python.black-formatter"
"editor.defaultFormatter": "charliermarsh.ruff"
}
}
1 change: 1 addition & 0 deletions awscrt-stubs/mqtt5.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ class PublishPacket:
message_expiry_interval_sec: Optional[int] = ...
topic_alias: Optional[int] = ...
response_topic: Optional[str] = ...
correlation_data_bytes: Optional[Union[bytes, str]] = ...
correlation_data: Optional[Any] = ...
subscription_identifiers: Optional[Sequence[int]] = ...
content_type: Optional[str] = ...
Expand Down
357 changes: 121 additions & 236 deletions poetry.lock

Large diffs are not rendered by default.

59 changes: 56 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,9 @@ python = "^3.7"

[tool.poetry.dev-dependencies]
awscrt = "*"
isort = { version = "*", python = ">=3.10" }
black = { version = "*", python = ">=3.10" }
pyright = "*"
ruff = "*"
mypy = { version = "*", python = ">=3.10" }
flake8 = { version = "*", python = ">=3.10" }
istub = { version = "*", python = ">=3.10" }

[build-system]
Expand All @@ -76,3 +75,57 @@ reportIncompatibleMethodOverride = "error"
reportIncompatibleVariableOverride = "error"
reportUnknownParameterType = "error"
pythonVersion = "3.7"

[tool.mypy]
python_version = "3.7"
warn_return_any = false
warn_unused_ignores = false
warn_unused_configs = true
disallow_untyped_defs = true
ignore_missing_imports = true
ignore_errors = false

[tool.ruff]
exclude = [
".eggs",
".git",
".git-rewrite",
".mypy_cache",
".pytest_cache",
".ruff_cache",
".venv",
".vscode",
"build",
"dist",
]

line-length = 100
indent-width = 4
target-version = "py37"

[tool.ruff.lint]
select = ["E4", "E7", "E9", "F", "B", "I", "N", "D", "C4", "C90", "RUF"]
ignore = [
"E203",
"D107",
"D200",
"D203",
"D212",
"D401",
"D406",
"D407",
"D413",
"D417",
]
fixable = ["ALL"]
unfixable = ["B"]
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
exclude = ["test_*.py", "*.pyi"]

[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
docstring-code-format = false
docstring-code-line-length = "dynamic"
7 changes: 3 additions & 4 deletions scripts/before_commit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ set -e
ROOT_PATH=$(dirname $(dirname $0))
cd $ROOT_PATH

poetry run npx pyright awscrt-stubs
poetry run flake8 awscrt-stubs
poetry run black awscrt-stubs
poetry run isort awscrt-stubs
poetry run pyright
poetry run ruff check
poetry run ruff format --check
poetry run mypy awscrt-stubs
poetry run istub -u
17 changes: 0 additions & 17 deletions setup.cfg

This file was deleted.

5 changes: 0 additions & 5 deletions setup.py

This file was deleted.

0 comments on commit c3ed8cc

Please sign in to comment.