Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Sep 27, 2021
1 parent 335c410 commit a625167
Show file tree
Hide file tree
Showing 9 changed files with 228 additions and 229 deletions.
54 changes: 27 additions & 27 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.json',
sourceType: 'module',
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended'
],
plugins: ['@typescript-eslint'],
rules: {
'@typescript-eslint/no-unused-vars': ['warn', { args: 'none' }],
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-namespace': 'off',
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/quotes': [
'error',
'single',
{ avoidEscape: true, allowTemplateLiterals: false }
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.json',
sourceType: 'module',
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
],
curly: ['error', 'all'],
eqeqeq: 'error',
'prefer-arrow-callback': 'error'
},
ignorePatterns: ['.eslintrc.js']
plugins: ['@typescript-eslint'],
rules: {
'@typescript-eslint/no-unused-vars': ['warn', { args: 'none' }],
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-namespace': 'off',
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/quotes': [
'error',
'single',
{ avoidEscape: true, allowTemplateLiterals: false },
],
curly: ['error', 'all'],
eqeqeq: 'error',
'prefer-arrow-callback': 'error',
},
ignorePatterns: ['.eslintrc.js'],
};
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ repos:
- '@typescript-eslint/eslint-plugin'
- '@typescript-eslint/parser'
- 'eslint-config-prettier'
- 'eslint-plugin-prettier'
- 'eslint-plugin-prettier'
21 changes: 10 additions & 11 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
module.exports = {
sourceMap: 'inline',
presets: [
[
'@babel/preset-env',
{
targets: {
node: 'current',
},
},
sourceMap: 'inline',
presets: [
[
'@babel/preset-env',
{
targets: {
node: 'current',
},
},
],
],
],
};

23 changes: 12 additions & 11 deletions ipympl/__init__.py
Original file line number Diff line number Diff line change
@@ -1,27 +1,28 @@
import sys
from ._version import version_info, __version__ # noqa

from ._version import __version__, version_info # noqa

npm_pkg_name = 'jupyter-matplotlib'


def _jupyter_labextension_paths():
return [{
'src': 'labextension',
'dest': npm_pkg_name
}]
return [{'src': 'labextension', 'dest': npm_pkg_name}]


def _jupyter_nbextension_paths():
return [{
'section': 'notebook',
'src': 'nbextension',
'dest': npm_pkg_name,
'require': npm_pkg_name + '/extension'
}]
return [
{
'section': 'notebook',
'src': 'nbextension',
'dest': npm_pkg_name,
'require': npm_pkg_name + '/extension',
}
]


# __init__.py is used by the nbextension installation.
# Conda cannot have dependencies for post-link scripts.
if 'matplotlib' in sys.modules:
import matplotlib

matplotlib.use('module://ipympl.backend_nbagg')
Loading

0 comments on commit a625167

Please sign in to comment.