diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0e571ad..bd7a35a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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 @@ -19,21 +19,21 @@ 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 @@ -41,7 +41,7 @@ repos: - 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 diff --git a/examples/train/facial_expression.py b/examples/train/facial_expression.py index 6a9f390..8fee2f7 100644 --- a/examples/train/facial_expression.py +++ b/examples/train/facial_expression.py @@ -14,6 +14,7 @@ - Train facial expression action. """ + # pylint: disable=unused-argument from enum import StrEnum diff --git a/examples/train/live_advance.py b/examples/train/live_advance.py index 14eb8e3..8fd9e65 100644 --- a/examples/train/live_advance.py +++ b/examples/train/live_advance.py @@ -17,6 +17,7 @@ ``` """ + # pylint: disable=unused-argument from typing import Any diff --git a/examples/train/mental_command.py b/examples/train/mental_command.py index 9ce501c..97356d5 100644 --- a/examples/train/mental_command.py +++ b/examples/train/mental_command.py @@ -14,6 +14,7 @@ - Train mental command action. """ + # pylint: disable=unused-argument from enum import StrEnum diff --git a/src/cortex/cortex.py b/src/cortex/cortex.py index 50ef674..73c77da 100644 --- a/src/cortex/cortex.py +++ b/src/cortex/cortex.py @@ -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 ---') @@ -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. @@ -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