mirror of https://github.com/Nonannet/copapy.git
ci/cd: path for pelfy project fixed &
type hints fixed for vector._map2
This commit is contained in:
parent
8877b4d893
commit
8f29662c9e
|
|
@ -48,7 +48,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
git clone --depth 1 https://github.com/Nonannet/pelfy.git /tmp/pelfy
|
git clone --depth 1 https://github.com/Nonannet/pelfy.git /tmp/pelfy
|
||||||
mkdir -p src/${{ github.event.repository.name }}/_vendor
|
mkdir -p src/${{ github.event.repository.name }}/_vendor
|
||||||
cp -r /tmp/pelfy/pelfy src/${{ github.event.repository.name }}/_vendor/
|
cp -r /tmp/pelfy/src/pelfy src/${{ github.event.repository.name }}/_vendor/
|
||||||
|
|
||||||
# Only needed for Linux ARM builds
|
# Only needed for Linux ARM builds
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
git clone --depth 1 https://github.com/Nonannet/pelfy.git /tmp/pelfy
|
git clone --depth 1 https://github.com/Nonannet/pelfy.git /tmp/pelfy
|
||||||
mkdir -p src/${{ github.event.repository.name }}/_vendor
|
mkdir -p src/${{ github.event.repository.name }}/_vendor
|
||||||
cp -r /tmp/pelfy/pelfy src/${{ github.event.repository.name }}/_vendor/
|
cp -r /tmp/pelfy/src/pelfy src/${{ github.event.repository.name }}/_vendor/
|
||||||
|
|
||||||
- name: Run tests with pytest
|
- name: Run tests with pytest
|
||||||
run: pytest -m "not runner"
|
run: pytest -m "not runner"
|
||||||
|
|
|
||||||
|
|
@ -301,7 +301,7 @@ class vector(Generic[TNum]):
|
||||||
"""Applies a function to each element of the vector and returns a new vector."""
|
"""Applies a function to each element of the vector and returns a new vector."""
|
||||||
return vector(func(x) for x in self.values)
|
return vector(func(x) for x in self.values)
|
||||||
|
|
||||||
def _map2(self, other: VecNumLike, func: Callable[[Any, Any], value[int | float]]) -> 'vector[Any]':
|
def _map2(self, other: VecNumLike, func: Callable[[Any, Any], value[int] | value[float]]) -> 'vector[Any]':
|
||||||
if isinstance(other, vector):
|
if isinstance(other, vector):
|
||||||
assert len(self.values) == len(other.values)
|
assert len(self.values) == len(other.values)
|
||||||
return vector(func(a, b) for a, b in zip(self.values, other.values))
|
return vector(func(a, b) for a, b in zip(self.values, other.values))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue