From f621ad338d9a4fabcf875d959ce60ef77315e091 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Nov 2022 17:57:03 +0100 Subject: [PATCH] Bump mistune from 0.8.4 to 2.0.3 (#303) * Bump mistune from 0.8.4 to 2.0.3 Bumps [mistune](https://github.com/lepture/mistune) from 0.8.4 to 2.0.3. - [Release notes](https://github.com/lepture/mistune/releases) - [Changelog](https://github.com/lepture/mistune/blob/master/docs/changes.rst) - [Commits](https://github.com/lepture/mistune/compare/v0.8.4...v2.0.3) --- updated-dependencies: - dependency-name: mistune dependency-type: direct:development ... Signed-off-by: dependabot[bot] * correct lint error * use new precommit action * switch linting to 3.8 due to flake8 bug * correct flake8 error on abstract class Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Sylvain Chevallier --- .github/workflows/test-devel.yml | 4 ++-- moabb/paradigms/base.py | 4 +++- moabb/pipelines/classification.py | 2 +- poetry.lock | 36 +++++++++++++++---------------- pyproject.toml | 2 +- 5 files changed, 25 insertions(+), 23 deletions(-) diff --git a/.github/workflows/test-devel.yml b/.github/workflows/test-devel.yml index b1b870a3f..2669c6542 100644 --- a/.github/workflows/test-devel.yml +++ b/.github/workflows/test-devel.yml @@ -76,7 +76,7 @@ jobs: fail-fast: true matrix: os: [ubuntu-18.04] - python-version: ["3.7"] + python-version: ["3.8"] steps: - uses: actions/checkout@v2 @@ -85,4 +85,4 @@ jobs: with: python-version: ${{ matrix.python-version }} - - uses: pre-commit/action@v2.0.0 + - uses: pre-commit/action@v3.0.0 diff --git a/moabb/paradigms/base.py b/moabb/paradigms/base.py index b5a9d2601..d2a0ad14d 100644 --- a/moabb/paradigms/base.py +++ b/moabb/paradigms/base.py @@ -12,6 +12,7 @@ class BaseParadigm(metaclass=ABCMeta): """Base Paradigm.""" + @abstractmethod def __init__(self): pass @@ -62,7 +63,8 @@ def prepare_process(self, dataset): The dataset corresponding to the raw file. mainly use to access dataset specific information. """ - pass + if dataset is not None: + pass def process_raw(self, raw, dataset, return_epochs=False): # noqa: C901 """ diff --git a/moabb/pipelines/classification.py b/moabb/pipelines/classification.py index 3773ba971..62e05da4a 100644 --- a/moabb/pipelines/classification.py +++ b/moabb/pipelines/classification.py @@ -68,7 +68,7 @@ def predict(self, X): if f.replace(".", "", 1).isnumeric(): S_x, S_y = self.cca.fit_transform(x.T, self.Yf[f].T) corr_f[f] = np.corrcoef(S_x.T, S_y.T)[0, 1] - y.append(self.one_hot[max(corr_f, key=lambda k: corr_f[k])]) + y.append(self.one_hot[max(corr_f, key=corr_f.get)]) return y def predict_proba(self, X): diff --git a/poetry.lock b/poetry.lock index c6e0e1cff..eb90e59e7 100644 --- a/poetry.lock +++ b/poetry.lock @@ -263,8 +263,8 @@ setuptools_scm = ">=4" [[package]] name = "mistune" -version = "0.8.4" -description = "The fastest markdown parser in pure Python" +version = "2.0.3" +description = "A sane Markdown parser with useful plugins and renderers" category = "dev" optional = false python-versions = "*" @@ -314,7 +314,7 @@ Jinja2 = ">=2.10" sphinx = ">=1.8" [package.extras] -testing = ["pytest", "pytest-cov", "matplotlib"] +testing = ["matplotlib", "pytest-cov", "pytest"] [[package]] name = "packaging" @@ -377,9 +377,9 @@ packaging = ">=20.0" requests = ">=2.19.0" [package.extras] -progress = ["tqdm (>=4.41.0,<5.0.0)"] -sftp = ["paramiko (>=2.7.0)"] xxhash = ["xxhash (>=1.4.3)"] +sftp = ["paramiko (>=2.7.0)"] +progress = ["tqdm (>=4.41.0,<5.0.0)"] [[package]] name = "pre-commit" @@ -492,10 +492,10 @@ scipy = ">=1.1.0" threadpoolctl = ">=2.0.0" [package.extras] -benchmark = ["matplotlib (>=2.2.3)", "pandas (>=0.25.0)", "memory-profiler (>=0.57.0)"] -docs = ["matplotlib (>=2.2.3)", "scikit-image (>=0.14.5)", "pandas (>=0.25.0)", "seaborn (>=0.9.0)", "memory-profiler (>=0.57.0)", "sphinx (>=4.0.1)", "sphinx-gallery (>=0.7.0)", "numpydoc (>=1.0.0)", "Pillow (>=7.1.2)", "sphinx-prompt (>=1.3.0)", "sphinxext-opengraph (>=0.4.2)"] -examples = ["matplotlib (>=2.2.3)", "scikit-image (>=0.14.5)", "pandas (>=0.25.0)", "seaborn (>=0.9.0)"] -tests = ["matplotlib (>=2.2.3)", "scikit-image (>=0.14.5)", "pandas (>=0.25.0)", "pytest (>=5.0.1)", "pytest-cov (>=2.9.0)", "flake8 (>=3.8.2)", "black (>=21.6b0)", "mypy (>=0.770)", "pyamg (>=4.0.0)"] +tests = ["pyamg (>=4.0.0)", "mypy (>=0.770)", "black (>=21.6b0)", "flake8 (>=3.8.2)", "pytest-cov (>=2.9.0)", "pytest (>=5.0.1)", "pandas (>=0.25.0)", "scikit-image (>=0.14.5)", "matplotlib (>=2.2.3)"] +examples = ["seaborn (>=0.9.0)", "pandas (>=0.25.0)", "scikit-image (>=0.14.5)", "matplotlib (>=2.2.3)"] +docs = ["sphinxext-opengraph (>=0.4.2)", "sphinx-prompt (>=1.3.0)", "Pillow (>=7.1.2)", "numpydoc (>=1.0.0)", "sphinx-gallery (>=0.7.0)", "sphinx (>=4.0.1)", "memory-profiler (>=0.57.0)", "seaborn (>=0.9.0)", "pandas (>=0.25.0)", "scikit-image (>=0.14.5)", "matplotlib (>=2.2.3)"] +benchmark = ["memory-profiler (>=0.57.0)", "pandas (>=0.25.0)", "matplotlib (>=2.2.3)"] [[package]] name = "scipy" @@ -613,8 +613,8 @@ optional = false python-versions = ">=3.5" [package.extras] -lint = ["flake8", "mypy", "docutils-stubs"] test = ["pytest"] +lint = ["docutils-stubs", "mypy", "flake8"] [[package]] name = "sphinxcontrib-devhelp" @@ -625,8 +625,8 @@ optional = false python-versions = ">=3.5" [package.extras] -lint = ["flake8", "mypy", "docutils-stubs"] test = ["pytest"] +lint = ["docutils-stubs", "mypy", "flake8"] [[package]] name = "sphinxcontrib-htmlhelp" @@ -637,8 +637,8 @@ optional = false python-versions = ">=3.6" [package.extras] -lint = ["flake8", "mypy", "docutils-stubs"] -test = ["pytest", "html5lib"] +test = ["html5lib", "pytest"] +lint = ["docutils-stubs", "mypy", "flake8"] [[package]] name = "sphinxcontrib-jsmath" @@ -649,7 +649,7 @@ optional = false python-versions = ">=3.5" [package.extras] -test = ["pytest", "flake8", "mypy"] +test = ["mypy", "flake8", "pytest"] [[package]] name = "sphinxcontrib-qthelp" @@ -660,8 +660,8 @@ optional = false python-versions = ">=3.5" [package.extras] -lint = ["flake8", "mypy", "docutils-stubs"] test = ["pytest"] +lint = ["docutils-stubs", "mypy", "flake8"] [[package]] name = "sphinxcontrib-serializinghtml" @@ -785,7 +785,7 @@ testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest- [metadata] lock-version = "1.1" python-versions = "^3.7" -content-hash = "d8455fb5c62ccfe69f1688fcede1d8ecede6bc530ad318df77daf924ef47c112" +content-hash = "5da9198b87a05f339be77fb87381af96cf3290707b2bf260ff68893340094ad3" [metadata.files] alabaster = [ @@ -1066,8 +1066,8 @@ matplotlib = [ {file = "matplotlib-3.5.1.tar.gz", hash = "sha256:b2e9810e09c3a47b73ce9cab5a72243a1258f61e7900969097a817232246ce1c"}, ] mistune = [ - {file = "mistune-0.8.4-py2.py3-none-any.whl", hash = "sha256:88a1051873018da288eee8538d476dffe1262495144b33ecb586c4ab266bb8d4"}, - {file = "mistune-0.8.4.tar.gz", hash = "sha256:59a3429db53c50b5c6bcc8a07f8848cb00d7dc8bdb431a4ab41920d201d4756e"}, + {file = "mistune-2.0.3-py2.py3-none-any.whl", hash = "sha256:e3964140c0775535fba50bd616fe180920044a64bc21850253267b07bff89924"}, + {file = "mistune-2.0.3.tar.gz", hash = "sha256:d7605b46b6156b53b7d52a465202b29a6f00f4ea4130ad5d25e9d5547d6b7e50"}, ] mne = [ {file = "mne-0.24.1-py3-none-any.whl", hash = "sha256:26f75fc0b468ed078f35a86a26fa75bab60887b914b90707000cbc0cb8b11e78"}, diff --git a/pyproject.toml b/pyproject.toml index 6c93b4016..9968b699b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -33,7 +33,7 @@ sphinx-gallery = "^0.8.2" sphinx-bootstrap-theme = "^0.8" numpydoc = "^1.1.0" m2r2 = "^0.2.7" -mistune = "<2" +mistune = "<3" pre-commit = "^2.11.1" tdlda = {git = "https://github.com/jsosulski/tdlda.git", rev = "0.1.0"}