Commit Graph

9 Commits

Author SHA1 Message Date
Alessio Bogon 5e10d3430f
Change function name so that it's clearer what it does 2024-12-01 11:00:31 +01:00
Alessio Bogon 4eb54fdc7a
Raise an error if a step defines reserved argument names
This can cause headaches in the future, when users can't figure out why their step argument 'datatable' or 'docstring' does not get the value they expect
2024-11-30 23:54:06 +01:00
Alessio Bogon 01b8b88974
Fix typing for `setdefault` 2024-10-25 21:58:16 +02:00
Alessio Bogon 9a69a6ecfc
Drop compatibility with pytest < 7 2024-09-28 18:28:50 +02:00
Jason Allen 2f3acbd0dc Response to feedback and make mypy happy. 2024-09-15 13:37:36 +01:00
pre-commit-ci[bot] 9081a08ec3 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2024-02-20 00:26:23 +00:00
JP-Ellis 4508b98536
fix(typing): improve decorator type hinting
The type hinting for the most commonly used decorators were incomplete,
resulting in decorated functions being obscured.

This makes use of the special type variable `ParamSpec` which allows the
type hinting a view into the parameters of a function. As ``ParamSpec`
was introduced in Python 3.10, `ParamSpec` is imported from the
`typing_extensions` module instead of the standard library.

I have also taken the opportunity to fix other instances of `Callable`
type hints missing their arguments.

Signed-off-by: JP-Ellis <josh@jpellis.me>
2023-11-16 10:13:08 +11:00
David Röthlisberger c8677a7783 tests: Use `pytester` fixture instead of `testdir`
`testdir` is deprecated. It's identical to `pytester`, except that
`testdir` returns `py.path` objects whereas `pytester` returns Python
stdlib `Path` objects. So I had to update usages of those paths.

`pytester` was added in pytest 6.2, which is our minimum supported
version.
2022-11-04 08:53:07 +00:00
Alessio Bogon 9301e97dce Use src/ based directory structure 2022-08-14 10:34:33 +02:00