Skip to content

Commit

Permalink
Fix type checker (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
gaborbernat authored Aug 28, 2023
1 parent 44432be commit d76a110
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 21 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,11 @@ jobs:
fail-fast: false
matrix:
py:
- "3.12.0-beta.2"
- "3.12.0-rc.1"
- "3.11"
- "3.10"
- "3.9"
- "3.8"
- "3.7"
os:
- ubuntu-latest

Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.0.285"
rev: "v0.0.286"
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand All @@ -19,10 +19,10 @@ repos:
- id: tox-ini-fmt
args: ["-p", "fix"]
- repo: https://github.com/tox-dev/pyproject-fmt
rev: "0.13.1"
rev: "1.1.0"
hooks:
- id: pyproject-fmt
additional_dependencies: ["tox>=4.6"]
additional_dependencies: ["tox>=4.10"]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v3.0.2"
hooks:
Expand Down
13 changes: 6 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
build-backend = "hatchling.build"
requires = [
"hatch-vcs>=0.3",
"hatchling>=1.17.1",
"hatchling>=1.18",
]

[project]
Expand All @@ -15,15 +15,14 @@ keywords = [
]
license.file = "LICENSE"
maintainers = [{ name = "Bernát Gábor", email = "[email protected]" }]
requires-python = ">=3.7"
requires-python = ">=3.8"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
Expand All @@ -36,11 +35,11 @@ dynamic = [
"version",
]
dependencies = [
"pytest>=7.3.1",
"pytest>=7.4",
]
optional-dependencies.test = [
"coverage>=7.2.7",
"pytest-mock>=3.10",
"coverage>=7.3",
"pytest-mock>=3.11.1",
]
urls.Homepage = "https://github.com/pytest-dev/pytest-env"
urls.Source = "https://github.com/pytest-dev/pytest-env"
Expand All @@ -58,7 +57,7 @@ line-length = 120
[tool.ruff]
select = ["ALL"]
line-length = 120
target-version = "py37"
target-version = "py38"
isort = {known-first-party = ["pytest_env"], required-imports = ["from __future__ import annotations"]}
ignore = [
"ANN101", # no type annotation for self
Expand Down
2 changes: 1 addition & 1 deletion src/pytest_env/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def pytest_addoption(parser: pytest.Parser) -> None:
parser.addini("env", type="linelist", help=help_msg, default=[])


@pytest.hookimpl(tryfirst=True) # type: ignore[misc]
@pytest.hookimpl(tryfirst=True)
def pytest_load_initial_conftests(
args: list[str], # noqa: ARG001
early_config: pytest.Config,
Expand Down
9 changes: 1 addition & 8 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ env_list =
py310
py39
py38
py37
type
readme
skip_missing_interpreters = true
Expand Down Expand Up @@ -44,7 +43,7 @@ commands =
[testenv:type]
description = run type check on code base
deps =
mypy==1.3
mypy==1.5.1
set_env =
{tty:MYPY_FORCE_COLOR = 1}
commands =
Expand All @@ -70,9 +69,3 @@ extras =
commands =
python -m pip list --format=columns
python -c 'import sys; print(sys.executable)'

[flake8]
max-complexity = 22
max-line-length = 120
noqa-require-code = true
dictionaries = en_US,python,technical,django

0 comments on commit d76a110

Please sign in to comment.