Skip to content

Commit 90c0558

Browse files
committed
ignore this it's a test
1 parent bbf7ee8 commit 90c0558

File tree

5 files changed

+69
-31
lines changed

5 files changed

+69
-31
lines changed

.github/workflows/CI-CD.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ concurrency:
1414
cancel-in-progress: true
1515

1616
jobs:
17-
tests:
18-
uses: ./.github/workflows/test.yaml
17+
quality:
18+
uses: ./.github/workflows/quality.yaml
1919

2020
docker:
21-
needs: tests
21+
needs: quality
2222
permissions:
2323
contents: read
2424
packages: write

.github/workflows/quality.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Quality Checks
2+
3+
on: workflow_call
4+
5+
jobs:
6+
quality:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
fail-fast: false
10+
matrix:
11+
check: [format, lint, test]
12+
include:
13+
- check: format
14+
name: "Format Check"
15+
command: "pdm run ruff format --check ."
16+
- check: lint
17+
name: "Lint Check"
18+
command: "pdm run ruff check ."
19+
- check: test
20+
name: "Run Tests"
21+
command: "pdm run tests"
22+
23+
name: ${{ matrix.name }}
24+
25+
steps:
26+
- uses: actions/checkout@v4
27+
28+
- name: Setup PDM
29+
uses: pdm-project/setup-pdm@v4
30+
with:
31+
cache: true
32+
33+
- name: Install dependencies
34+
run: pdm install -d
35+
36+
- name: ${{ matrix.name }}
37+
run: ${{ matrix.command }}

.github/workflows/test.yaml

Lines changed: 0 additions & 21 deletions
This file was deleted.

readme.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -519,6 +519,26 @@ to ensure your code adheres to the style guidelines. We provide a command to lin
519519
code using `pdm run lint`. For this to work you have to install the development
520520
dependencies using `pdm install -d` if you haven't already.
521521

522+
## Copyright Headers Management
523+
524+
This project uses HashiCorp's [Copywrite](https://github.com/hashicorp/copywrite) tool to manage copyright headers across all source files. Copywrite automatically ensures consistent copyright headers and license information across the codebase.
525+
526+
The project includes a `.copywrite.hcl` file that configures how copyright headers are managed:
527+
528+
### Usage
529+
530+
To check if any files are missing copyright headers:
531+
532+
```bash
533+
copywrite headers --plan
534+
```
535+
536+
To automatically add missing copyright headers:
537+
538+
```bash
539+
copywrite headers
540+
```
541+
522542
## Deployment
523543

524544
Botkit is designed to be deployed on various platforms, including cloud services like

src/utils/extensions.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from collections.abc import Callable
99
from glob import iglob
1010
from types import ModuleType
11-
from typing import Any
11+
from typing import Any, TypeGuard
1212

1313
import discord
1414
from quart import Quart
@@ -18,13 +18,15 @@
1818

1919

2020
def check_typing(module: ModuleType, func: Callable, types: dict[str, Any]) -> None:
21-
signature = inspect.signature(func)
21+
signature = inspect.signature(
22+
func
23+
)
2224
for name, parameter in signature.parameters.items():
23-
if name in types and parameter.annotation != types[name]:
24-
warnings.warn(
25-
f"Parameter {name} of function {func.__name__} of module {module.__name__} does not have the correct type annotation (is {parameter.annotation} should be {types[name]})", # noqa: E501
26-
stacklevel=1,
27-
)
25+
if name in types and parameter.annotation != types[name]:
26+
warnings.warn(
27+
f"Parameter {name} of function {func.__name__} of module {module.__name__} does not have the correct type annotation (is {parameter.annotation} should be {types[name]})", # noqa: E501
28+
stacklevel=1,
29+
)
2830

2931

3032
def check_func(module: ModuleType, func: Callable, max_args: int, types: dict[str, Any]) -> None:

0 commit comments

Comments
 (0)