Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/integration-test' into integrati…
Browse files Browse the repository at this point in the history
…on-test

# Conflicts:
#	tox.ini
  • Loading branch information
lengau committed Jan 26, 2023
2 parents 28bb9d8 + 63fc646 commit 4d76e9f
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 4 deletions.
11 changes: 8 additions & 3 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@
extends: ["config:base"],
labels: ["dependencies"], // For convenient searching in GitHub
pip_requirements: {
fileMatch: ["pyproject.toml", "tox.ini"]
fileMatch: ["^tox.ini$"]
},
packageRules: [
pip_setup: {
fileMatch: ["^pyproject.toml$", "(^|/)setup\\.py$"]
},
packageRules: [
{
// Automerge patches, pin changes and digest changes.
// Also groups these changes together.
Expand All @@ -23,6 +26,7 @@
},
{
// GitHub Actions are higher priority to update than most dependencies.
groupName: "GitHub Actions",
matchManagers: ["github-actions"],
prPriority: 1
},
Expand Down Expand Up @@ -52,8 +56,9 @@
{
// tox.ini can get updates too if we specify for each package.
fileMatch: ["tox.ini"],
depTypeTemplate: "devDependencies",
matchStrings: [
"# renovate: datasource=(?<datasource>\\S+)\n\\s+(?<depName>.*?)[=><]=?(?<currentValue>.*?)\\n",
"# renovate: datasource=(?<datasource>\S+)\n\s+(?<depName>.*?)(\[[\w]*\])*[=><]=?(?<currentValue>.*?)\n"
]
}
],
Expand Down
24 changes: 24 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,30 @@ pythonPlatform = "Linux"
venvPath = ".tox"
venv = "py38"

[tool.mypy]
python_version = "3.8"
packages = ["starcraft"]
exclude = [
"build"
]
warn_unused_configs = true
warn_redundant_casts = true
strict_equality = true
strict_concatenate = true
warn_return_any = true
disallow_subclassing_any = true
disallow_untyped_decorators = true
disallow_any_generics = true

[[tool.mypy.overrides]]
module = ["starcraft"]
disallow_untyped_defs = true
no_implicit_optional = true

[[tool.mypy.overrides]]
module = ["tests.*"]
strict = false

[tool.ruff]
line-length = 88
target-version = "py38"
Expand Down
7 changes: 6 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -59,28 +59,33 @@ deps =
ruff>=0.0.226
# renovate: datasource=pypi
codespell[tomli]>=2.2.2
# renovate: datasource=pypi
mypy[reports]>=0.991
env_dir = {work_dir}/linting
runner = ignore_env_name_mismatch

[shellcheck]
find = find {tox_root} \( -name .git -o -name .tox \) -prune -o -print
filter = file --mime-type -Nnf- | grep shellscript | cut -f1 -d:

[testenv:lint-{black,ruff,pyright,shellcheck,codespell}]
[testenv:lint-{black,ruff,pyright,shellcheck,codespell,mypy}]
description = Lint the source code
base = testenv, lint
labels = lint
allowlist_externals =
pyright: pyright
shellcheck: bash, xargs
mypy: mkdir
commands_pre =
mypy: mkdir -p .mypy_cache
shellcheck: bash -c '{[shellcheck]find} | {[shellcheck]filter} > {env_tmp_dir}/shellcheck_files'
commands =
black: black --check --diff {tty:--color} {posargs} .
ruff: ruff --diff --respect-gitignore {posargs} .
pyright: pyright --lib {posargs}
shellcheck: xargs -ra {env_tmp_dir}/shellcheck_files shellcheck
codespell: codespell --toml {tox_root}/pyproject.toml {posargs}
mypy: mypy --install-types --non-interactive .

[testenv:format-{black,ruff,codespell}]
description = Automatically format source code
Expand Down

0 comments on commit 4d76e9f

Please sign in to comment.