Skip to content

Commit

Permalink
Refreshed all lock files, Prevent releases for unrelated files (#204)
Browse files Browse the repository at this point in the history
* bump all dependencies

don't release new versions on *.md or *.lock changes
applied new black formatting rules

* bump mypy to fix a bunch of issues
  • Loading branch information
jonapich authored Mar 24, 2024
1 parent 3039f8b commit 75cc0d2
Show file tree
Hide file tree
Showing 57 changed files with 1,253 additions and 1,687 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/coveo-arnparse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@ on:
- main
paths:
- 'coveo-arnparse/**'
- '!**.lock'
- '!**.md'

pull_request:
types: [opened, synchronize, reopened]
paths:
- 'coveo-arnparse/**'
- '.github/workflows/coveo-arnparse.yml'
- '!**.md'

workflow_dispatch:
inputs:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/coveo-example-library.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@ on:
- main
paths:
- 'coveo-example-library/**'
- '!**.lock'
- '!**.md'

pull_request:
types: [opened, synchronize, reopened]
paths:
- 'coveo-example-library/**'
- '.github/workflows/coveo-example-library.yml'
- '!**.md'

workflow_dispatch:
inputs:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/coveo-functools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@ on:
- main
paths:
- 'coveo-functools/**'
- '!**.lock'
- '!**.md'

pull_request:
types: [opened, synchronize, reopened]
paths:
- 'coveo-functools/**'
- '.github/workflows/coveo-functools.yml'
- '!**.md'

workflow_dispatch:
inputs:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/coveo-itertools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@ on:
- main
paths:
- 'coveo-itertools/**'
- '!**.lock'
- '!**.md'

pull_request:
types: [opened, synchronize, reopened]
paths:
- 'coveo-itertools/**'
- '.github/workflows/coveo-itertools.yml'
- '!**.md'

workflow_dispatch:
inputs:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/coveo-pypi-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@ on:
- main
paths:
- 'coveo-pypi-cli/**'
- '!**.lock'
- '!**.md'

pull_request:
types: [opened, synchronize, reopened]
paths:
- 'coveo-pypi-cli/**'
- '.github/workflows/coveo-pypi-cli.yml'
- '!**.md'

workflow_dispatch:
inputs:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/coveo-ref.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@ on:
- main
paths:
- 'coveo-ref/**'
- '!**.lock'
- '!**.md'

pull_request:
types: [opened, synchronize, reopened]
paths:
- 'coveo-ref/**'
- '.github/workflows/coveo-ref.yml'
- '!**.md'

workflow_dispatch:
inputs:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/coveo-settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@ on:
- main
paths:
- 'coveo-settings/**'
- '!**.lock'
- '!**.md'

pull_request:
types: [opened, synchronize, reopened]
paths:
- 'coveo-settings/**'
- '.github/workflows/coveo-settings.yml'
- '!**.md'

workflow_dispatch:
inputs:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/coveo-styles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@ on:
- main
paths:
- 'coveo-styles/**'
- '!**.lock'
- '!**.md'

pull_request:
types: [opened, synchronize, reopened]
paths:
- 'coveo-styles/**'
- '.github/workflows/coveo-styles.yml'
- '!**.md'

workflow_dispatch:
inputs:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/coveo-systools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@ on:
- main
paths:
- 'coveo-systools/**'
- '!**.lock'
- '!**.md'

pull_request:
types: [opened, synchronize, reopened]
paths:
- 'coveo-systools/**'
- '.github/workflows/coveo-systools.yml'
- '!**.md'

workflow_dispatch:
inputs:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/coveo-testing-extras.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@ on:
- main
paths:
- 'coveo-testing-extras/**'
- '!**.lock'
- '!**.md'

pull_request:
types: [opened, synchronize, reopened]
paths:
- 'coveo-testing-extras/**'
- '.github/workflows/coveo-testing-extras.yml'
- '!**.md'

workflow_dispatch:
inputs:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/coveo-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@ on:
- main
paths:
- 'coveo-testing/**'
- '!**.lock'
- '!**.md'

pull_request:
types: [opened, synchronize, reopened]
paths:
- 'coveo-testing/**'
- '.github/workflows/coveo-testing.yml'
- '!**.md'

workflow_dispatch:
inputs:
Expand Down
224 changes: 94 additions & 130 deletions coveo-arnparse/poetry.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion coveo-arnparse/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ bandit = "*"
black = "*"
coveo-testing = { path = "../coveo-testing", develop = true }
flake8 = "*"
mypy = "0.950"
mypy = "1.9.0"
pytest = "*"


Expand Down
224 changes: 94 additions & 130 deletions coveo-example-library/poetry.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion coveo-example-library/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ python = ">=3.8"
bandit = "*"
black = "*"
coveo-testing = { path = "../coveo-testing", develop = true }
mypy = "0.950"
mypy = "1.9.0"
pytest = "*"

[tool.stew.ci]
Expand Down
1 change: 0 additions & 1 deletion coveo-functools/coveo_functools/annotations.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""Annotation-related utilities."""


import sys
from dataclasses import InitVar
from typing import Type, Dict, get_type_hints, Callable, Union, Any
Expand Down
7 changes: 2 additions & 5 deletions coveo-functools/coveo_functools/dispatch.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""singledispatch is too young and needs a little help..."""


from functools import singledispatch as _singledispatch, update_wrapper
import inspect
from typing import Any, Type, cast, Union, Callable, TypeVar
Expand All @@ -10,11 +9,9 @@


class SingleDispatch(Protocol[T]):
def register(*args: Any, **kwargs: Any) -> "SingleDispatch[T]":
...
def register(*args: Any, **kwargs: Any) -> "SingleDispatch[T]": ...

def __call__(*args: Any, **kwargs: Any) -> T:
...
def __call__(*args: Any, **kwargs: Any) -> T: ...


class _Dispatch:
Expand Down
20 changes: 7 additions & 13 deletions coveo-functools/coveo_functools/flex/decorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,25 +29,21 @@


@overload
def flex(*, errors: ErrorBehavior = "deprecated") -> Callable[[RealObject], WrappedObject]:
...
def flex(*, errors: ErrorBehavior = "deprecated") -> Callable[[RealObject], WrappedObject]: ...


@overload
def flex(
obj: None, *, errors: ErrorBehavior = "deprecated"
) -> Callable[[RealObject], WrappedObject]:
...
) -> Callable[[RealObject], WrappedObject]: ...


@overload
def flex(obj: RealClass, *, errors: ErrorBehavior = "deprecated") -> WrappedClass:
...
def flex(obj: RealClass, *, errors: ErrorBehavior = "deprecated") -> WrappedClass: ...


@overload
def flex(obj: RealFunction, *, errors: ErrorBehavior = "deprecated") -> WrappedFunction:
...
def flex(obj: RealFunction, *, errors: ErrorBehavior = "deprecated") -> WrappedFunction: ...


def flex(
Expand Down Expand Up @@ -97,13 +93,11 @@ def obj(self, ...)


@overload
def _generate_wrapper(obj: RealClass, *, errors: ErrorBehavior) -> WrappedClass:
...
def _generate_wrapper(obj: RealClass, *, errors: ErrorBehavior) -> WrappedClass: ...


@overload
def _generate_wrapper(obj: RealFunction, *, errors: ErrorBehavior) -> WrappedFunction:
...
def _generate_wrapper(obj: RealFunction, *, errors: ErrorBehavior) -> WrappedFunction: ...


def _generate_wrapper(obj: RealObject, *, errors: ErrorBehavior) -> WrappedObject:
Expand All @@ -120,7 +114,7 @@ def _generate_callable_wrapper(fn: RealFunction, errors: ErrorBehavior) -> Wrapp
"""Class decorators"""

@functools.wraps(fn)
def wrapper(*args: Any, **kwargs: Any) -> T:
def wrapper(*args: Any, **kwargs: Any) -> T: # type: ignore[type-var]
value: T = fn(*args, **convert_kwargs_for_unpacking(kwargs, hint=fn, errors=errors))
if hasattr(value, "__dict__"):
value.__dict__[RAW_KEY] = kwargs
Expand Down
5 changes: 2 additions & 3 deletions coveo-functools/coveo_functools/flex/deserializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def convert_kwargs_for_unpacking(

# convert the values so they match the additional metadata if available, else fn's annotations.
converted_kwargs = {}
for arg_name, arg_hint in {**find_annotations(fn), **additional_metadata}.items(): # type: ignore[arg-type]
for arg_name, arg_hint in {**find_annotations(fn), **additional_metadata}.items():
if arg_name not in mapped_kwargs:
continue # this may be ok, for instance if the target argument has a default

Expand All @@ -78,8 +78,7 @@ def deserialize(
*,
hint: Type[T],
errors: ErrorBehavior = "deprecated",
) -> T:
...
) -> T: ...


@overload
Expand Down
Loading

0 comments on commit 75cc0d2

Please sign in to comment.