Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v6.0.0
hooks:
- id: check-ast
- id: check-docstring-first
Expand All @@ -19,29 +19,29 @@ repos:
- id: python-use-type-annotations

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.11.2
rev: v2.1.0
hooks:
- id: mypy
additional_dependencies: [typing_extensions]
args: [--config-file, ./pyproject.toml]

- repo: https://github.com/PyCQA/docformatter
rev: v1.7.5
rev: v1.7.8
hooks:
- id: docformatter
additional_dependencies: [tomli]
args: ["--in-place", "--config", "./pyproject.toml"]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.4
rev: v0.15.18
hooks:
# Run the linter
- id: ruff
args: [--fix]
- id: ruff-format

- repo: https://github.com/python-poetry/poetry
rev: 1.8.0
rev: 2.4.1
hooks:
- id: poetry-check
# - id: poetry-lock
Expand Down
1 change: 1 addition & 0 deletions examples/train/facial_expression.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
- Train facial expression action.

"""

# pylint: disable=unused-argument

from enum import StrEnum
Expand Down
1 change: 1 addition & 0 deletions examples/train/live_advance.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
```

"""

# pylint: disable=unused-argument

from typing import Any
Expand Down
1 change: 1 addition & 0 deletions examples/train/mental_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
- Train mental command action.

"""

# pylint: disable=unused-argument

from enum import StrEnum
Expand Down
11 changes: 6 additions & 5 deletions src/cortex/cortex.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,10 +285,11 @@ def authorize(self) -> None:
self.ws.send(json.dumps(_authorize, indent=4))

def generate_new_token(self) -> None:
"""Generate a new token. Use it to extend the expiration date of a token.
"""Generate a new token.

Read More:
[generateNewToken](https://emotiv.gitbook.io/cortex-api/authentication/generatenewtoken)
Use it to extend the expiration date of a token.
Read More:
[generateNewToken](https://emotiv.gitbook.io/cortex-api/authentication/generatenewtoken)

"""
logger.info('--- Generating a new token ---')
Expand Down Expand Up @@ -639,7 +640,7 @@ def export_record( # noqa: D417
folder: str | Path,
stream_types: list[str],
# pylint: disable-next=redefined-builtin,implicit-str-concat
format: Literal['EDF' 'EDFPLUS', 'BDFPLUS', 'CSV'],
format: Literal['EDFEDFPLUS', 'BDFPLUS', 'CSV'],
**kwargs: str | list[str] | bool,
) -> None:
"""Export one or more records.
Expand Down Expand Up @@ -1260,7 +1261,7 @@ def ws(self) -> websocket.WebSocketApp:

@property
def auth(self) -> str:
"""str: The authorization token."""
"""Str: The authorization token."""
if self._auth is None:
raise ValueError('No authorization token. Call `authorize()` to generate it.')
return self._auth
Loading