From 079a079515c559aedc07e7bbe6b4371e59503b92 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 6 Jan 2025 18:22:55 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/PyCQA/flake8: 4.0.1 → 7.1.1](https://github.com/PyCQA/flake8/compare/4.0.1...7.1.1) - https://github.com/myint/autoflake → https://github.com/PyCQA/autoflake - [github.com/PyCQA/autoflake: v1.4 → v2.3.1](https://github.com/PyCQA/autoflake/compare/v1.4...v2.3.1) - [github.com/PyCQA/isort: 5.10.1 → 5.13.2](https://github.com/PyCQA/isort/compare/5.10.1...5.13.2) - [github.com/psf/black: 22.6.0 → 24.10.0](https://github.com/psf/black/compare/22.6.0...24.10.0) - [github.com/asottile/pyupgrade: v2.34.0 → v3.19.1](https://github.com/asottile/pyupgrade/compare/v2.34.0...v3.19.1) - [github.com/pre-commit/mirrors-prettier: v2.7.1 → v4.0.0-alpha.8](https://github.com/pre-commit/mirrors-prettier/compare/v2.7.1...v4.0.0-alpha.8) - [github.com/pre-commit/mirrors-eslint: v8.19.0 → v9.17.0](https://github.com/pre-commit/mirrors-eslint/compare/v8.19.0...v9.17.0) --- .pre-commit-config.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0a7bfd8..9669794 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,36 +2,36 @@ ci: autoupdate_schedule: 'quarterly' repos: - repo: https://github.com/PyCQA/flake8 - rev: 4.0.1 + rev: 7.1.1 hooks: - id: flake8 additional_dependencies: [flake8-typing-imports==1.7.0] - - repo: https://github.com/myint/autoflake - rev: v1.4 + - repo: https://github.com/PyCQA/autoflake + rev: v2.3.1 hooks: - id: autoflake args: ["--in-place", "--remove-all-unused-imports", "--ignore-init-module-imports", "--remove-unused-variables"] - repo: https://github.com/PyCQA/isort - rev: 5.10.1 + rev: 5.13.2 hooks: - id: isort - repo: https://github.com/psf/black - rev: 22.6.0 + rev: 24.10.0 hooks: - id: black - repo: https://github.com/asottile/pyupgrade - rev: v2.34.0 + rev: v3.19.1 hooks: - id: pyupgrade args: [--py37-plus] - repo: https://github.com/pre-commit/mirrors-prettier - rev: 'v2.7.1' + rev: 'v4.0.0-alpha.8' hooks: - id: prettier types: [ts] - repo: https://github.com/pre-commit/mirrors-eslint - rev: 'v8.19.0' + rev: 'v9.17.0' hooks: - id: eslint files: \.ts$ # *.ts From 1afa79af019e90380a289874f80edb4b428be356 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 6 Jan 2025 18:23:20 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/plugin.ts | 2 +- src/widget.ts | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/plugin.ts b/src/plugin.ts index a928e79..498d4b2 100644 --- a/src/plugin.ts +++ b/src/plugin.ts @@ -31,7 +31,7 @@ export default ipycytoscapePlugin; */ function activateWidgetExtension( app: Application, - registry: IJupyterWidgetRegistry + registry: IJupyterWidgetRegistry, ): void { registry.registerWidget({ name: MODULE_NAME, diff --git a/src/widget.ts b/src/widget.ts index 5add4ea..8ec2c15 100644 --- a/src/widget.ts +++ b/src/widget.ts @@ -117,14 +117,14 @@ export class CytoscapeView extends DOMWidgetView { this.nodeViews = new widgets.ViewList( this.addNodeModel, this.removeNodeView, - this + this, ); this.nodeViews.update(this.model.get('graph').get('nodes')); this.edgeViews = new widgets.ViewList( this.addEdgeModel, this.removeEdgeView, - this + this, ); this.edgeViews.update(this.model.get('graph').get('edges')); this.cytoscape_obj.endBatch(); @@ -145,18 +145,18 @@ export class CytoscapeView extends DOMWidgetView { this.model.on( 'change:user_zooming_enabled', this._updateUserZoomingEnabled, - this + this, ); this.model.on('change:panning_enabled', this._updatePanningEnabled, this); this.model.on( 'change:user_panning_enabled', this._updateUserPanningEnabled, - this + this, ); this.model.on( 'change:box_selection_enabled', this._updateBoxSelectionEnabled, - this + this, ); this.model.on('change:selection_type', this._updateSelectionType, this); this.model.on('change:touch_tap_threshold', this.value_changed, this); @@ -171,7 +171,7 @@ export class CytoscapeView extends DOMWidgetView { this.model.on( 'change:_interaction_handlers', this.listenForUserEvents, - this + this, ); const layout = this.model.get('layout'); @@ -309,7 +309,7 @@ export class CytoscapeView extends DOMWidgetView { } private _updateUserZoomingEnabled() { this.cytoscape_obj.userZoomingEnabled( - this.model.get('user_zooming_enabled') + this.model.get('user_zooming_enabled'), ); } private _updatePanningEnabled() { @@ -317,12 +317,12 @@ export class CytoscapeView extends DOMWidgetView { } private _updateUserPanningEnabled() { this.cytoscape_obj.userPanningEnabled( - this.model.get('user_panning_enabled') + this.model.get('user_panning_enabled'), ); } private _updateBoxSelectionEnabled() { this.cytoscape_obj.boxSelectionEnabled( - this.model.get('box_selection_enabled') + this.model.get('box_selection_enabled'), ); } private _updateSelectionType() { @@ -357,7 +357,7 @@ export class CytoscapeView extends DOMWidgetView { */ _addElementListeners( ele: cytoscape.CollectionReturnValue, - view: DOMWidgetView + view: DOMWidgetView, ) { ele.on('select', (event) => { view.model.set('selected', true);