Commit Graph

1462 Commits

Author SHA1 Message Date
Alessio Bogon 01c99a6693
Merge pull request #765 from pytest-dev/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2025-02-13 22:33:26 +01:00
pre-commit-ci[bot] c85906de28 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-02-10 23:16:22 +00:00
pre-commit-ci[bot] e9f85f950f
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/astral-sh/ruff-pre-commit: 89c421dff2e1026ba12cdb9ebd731f4a83aa8021 → 895ebb389825c29bd4e0addcf7579d6c69d199cc](89c421dff2...895ebb3898)
- [github.com/python-poetry/poetry: f03d8f98781934df7910be5b6c14756e047ef432 → bd500dd3bdfaec3de6894144c9cedb3a9358be84](f03d8f9878...bd500dd3bd)
2025-02-10 23:15:01 +00:00
Alessio Bogon c893aa3fd1
Fix URLs definition 2025-01-11 23:37:41 +01:00
Alessio Bogon 21322a7d81
Merge pull request #763 from pytest-dev/add-envrc
Add `.envrc` that loads poetry virtualenv
2025-01-11 21:15:53 +01:00
Alessio Bogon ed1d5818bd
Add `.envrc` that loads poetry virtualenv 2025-01-09 07:56:24 +01:00
Alessio Bogon 52e3cdfe23
Merge pull request #762 from pytest-dev/poetry-2
Use poetry v2.0.0
2025-01-08 22:42:00 +01:00
Alessio Bogon c97dc028b0
delete `sourcery` config 2025-01-08 22:08:34 +01:00
Alessio Bogon 4b2c2ab0d9
Delete var `distshare`, it was removed in tox 4 2025-01-08 21:55:35 +01:00
Alessio Bogon 7d0bb532d3
Bump `ruff` version in pre-commit config 2025-01-08 21:50:15 +01:00
Alessio Bogon d26d5f8411
Do not run `poetry lock` in pre-commit
It will connect to PyPI, and it seems that pre-commit.ci does not allow that.
In any case, we should only check if `poetry.lock` is in sync using `poetry check --lock`. That's enough.
2025-01-08 21:09:37 +01:00
Alessio Bogon 86f7837fe2
Pin version of poetry used 2025-01-08 21:00:16 +01:00
Alessio Bogon 2a03e2ba94
`poetry export` is provided by a plugin now 2025-01-08 20:59:39 +01:00
Alessio Bogon ccdfe2b2bd
Add `poetry` pre-commit hook 2025-01-08 20:52:27 +01:00
Alessio Bogon c865dac387
Bump poetry to v2.0.0 2025-01-08 20:44:11 +01:00
Alessio Bogon 482550570d
Merge pull request #756 from pytest-dev/dependabot/pip/jinja2-3.1.5
Bump jinja2 from 3.1.4 to 3.1.5
2025-01-02 09:08:09 +01:00
dependabot[bot] 83bbe38ae0
Bump jinja2 from 3.1.4 to 3.1.5
Bumps [jinja2](https://github.com/pallets/jinja) from 3.1.4 to 3.1.5.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/jinja/compare/3.1.4...3.1.5)

---
updated-dependencies:
- dependency-name: jinja2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-02 04:01:35 +00:00
Alessio Bogon a870b66217
Merge pull request #758 from kieran-ryan/ruff-migration
Migrate `black`, `flake8`, `isort`, `pyupgrade` linters and formatters to `ruff`
2025-01-02 05:00:07 +01:00
Kieran Ryan b96b83e74b
Merge branch 'master' into ruff-migration 2025-01-01 21:47:32 +00:00
Kieran Ryan 4bf4af2846 refactor: Ignore ISC001 as covered by formatter 2025-01-01 21:44:01 +00:00
Kieran Ryan 4427f19403 refactor: Explicit exception 'raise ... from None' (B904)
https://docs.astral.sh/ruff/rules/raise-without-from-inside-except/
2025-01-01 21:39:24 +00:00
Kieran Ryan 59c638c622 Lint perflint, comprehensions and blind-except (PERF, C4, BLE)
- flake8-blind-except: https://docs.astral.sh/ruff/rules/#flake8-blind-except-ble
- flake8-comprehensions: https://docs.astral.sh/ruff/rules/#flake8-comprehensions-c4
- Perflint: https://docs.astral.sh/ruff/rules/#perflint-perf
2025-01-01 21:39:24 +00:00
Kieran Ryan d70029dde9 refactor: Drop implicit str concatentation (ISC001)
- Applied through ruff (`ruff check --select=TC --unsafe-fixes --fix`)
2025-01-01 21:39:19 +00:00
Kieran Ryan eb5ca74524 refactor: Missing None return type hint on FeatureParser __init__ (ANN204)
- Detected through ruff
2025-01-01 21:38:48 +00:00
Kieran Ryan d029b9e71a docs: Align docstring type hints with __future__ annotations
- `Optional` -> `... | None`
- `List` -> `list`
2025-01-01 21:38:43 +00:00
Kieran Ryan 330652549e Apply codespell spelling fixes 2024-12-31 19:23:00 +00:00
Kieran Ryan 06bc96e8ab Require future annotations import for tests (I002)
- Applied through ruff `--fix`
- Subsequently simplified optional in `tests/feature/test_report.py`
2024-12-31 19:23:00 +00:00
Kieran Ryan f5eedc981b Recommend ruff Visual Studio Code extension
- Ensure linting tight feedback loop for contributors
2024-12-31 19:23:00 +00:00
Kieran Ryan 51a30872c4 Migrate linting to ruff
- Configure `ruff` as a drop in replacement for `flake8`, `isort` and `pyupgrade`
- Lint for required `from __future__ import annotations` in `src/`
- Enable automatic fixing of linting errors in pre-commit
- Applied ruff `--fix` for `I001` on `src/pytest_bdd/parser.py`
- Applied ruff `--fix` for `UP032` on `src/pytest_bdd/gherkin_terminal_reporter.py`
- Applied ruff `--fix` for `tests/feature/test_feature_base_dir.py`
- Applied ruff `--fix` for `tests/feature/test_feature_base_dir.py`
- Ignore `B904` error on `src/pytest_bdd/scenario.py`
- Fix invalid pre-commit config error due to indentation syntax error
- Freeze pre-commit dependency versions
2024-12-31 19:22:48 +00:00
Alessio Bogon 9ff6980311
Merge pull request #753 from pytest-dev/ab/gherkin-official-req
Relax `gherkin-official` dep requirement
2024-12-08 13:59:12 +01:00
Alessio Bogon 7decb11aac
Use 4 parallel workers in tox runs 2024-12-08 12:51:38 +01:00
Alessio Bogon 4664baa2ca
Add changelog entry 2024-12-08 12:44:38 +01:00
Alessio Bogon d4a5271533
Fix typing
TypedDict is not a subclass of `dict`, but it is a subclass of `Mapping`. Go figure.
2024-12-08 12:33:46 +01:00
Alessio Bogon 0d1c46ba51
Add `gherkin-official` combinations to tox matrix 2024-12-08 12:17:42 +01:00
Alessio Bogon de4bb86f11
`poetry update` 2024-12-08 12:12:39 +01:00
Alessio Bogon 8ce79eafa6
Less strict `gherkin-official` version requirement 2024-12-08 12:10:36 +01:00
Alessio Bogon 9bb4967d9c
Merge pull request #658 from pytest-dev/ab/fix-typing
Fix typing
2024-12-05 23:27:38 +01:00
Alessio Bogon f4413e586d
Update/fix changelog 2024-12-05 23:19:26 +01:00
Alessio Bogon 0bb8b0c1cb
Fix `description` typing 2024-12-05 23:13:51 +01:00
Alessio Bogon 150e07988e
Merge branch 'master' into ab/fix-typing 2024-12-05 22:48:21 +01:00
Alessio Bogon 6cdd340504
Bump version to 8.1.0 2024-12-05 22:39:37 +01:00
Alessio Bogon 68b9625ae7
Fix Changelog 2024-12-05 22:37:39 +01:00
Alessio Bogon 86a956e12b
Merge pull request #745 from pytest-dev/test-177 2024-12-02 23:12:49 +01:00
jsa34 633ee28fd7
Merge branch 'master' into test-177 2024-12-02 22:09:00 +00:00
Jason Allen 6e1f54d291 Update test steps 2024-12-02 22:08:48 +00:00
Alessio Bogon 6a2b2fbfbc
Merge pull request #749 from pytest-dev/test-feature-description-in-json
Add scenario description to JSON and add test for JSON correctly populating the description from a feature
2024-12-02 22:17:32 +01:00
Jason Allen 02d7c3f48b Add changelog entry 2024-12-02 21:52:50 +01:00
Jason Allen 4df8963d2b Add new description field that is now expected 2024-12-02 21:52:50 +01:00
Jason Allen e19288ac07 Add missing scenario description in json 2024-12-02 21:52:50 +01:00
Jason Allen 0efda3f87d Add test for json correctly populating the description from a feature 2024-12-02 21:52:50 +01:00