Skip to content

Commit 37c50b0

Browse files
committed
Upgrade generated files to double-quotes
1 parent 0bfbf8a commit 37c50b0

File tree

9 files changed

+89
-91
lines changed

9 files changed

+89
-91
lines changed

css/widget.css

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
white-space: nowrap;
1919

2020
background-color: #D1D5DB;
21+
color: #1F2937;
2122
}
2223
.selected {
2324
background: white;

jupyterannotate/_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
# Copyright (c) Stuart Quin.
55
# Distributed under the terms of the Modified BSD License.
66

7-
version_info = (0, 1, 0)
7+
version_info = (0, 1, 1)
88
__version__ = ".".join(map(str, version_info))

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jupyterannotate",
3-
"version": "0.1.0",
3+
"version": "0.1.1",
44
"description": "A Custom Jupyter Widget Library",
55
"keywords": [
66
"jupyter",

setup.py

+62-65
Original file line numberDiff line numberDiff line change
@@ -17,106 +17,103 @@
1717
ensure_targets,
1818
combine_commands,
1919
get_version,
20-
skip_if_exists
20+
skip_if_exists,
2121
)
2222

2323
HERE = os.path.dirname(os.path.abspath(__file__))
2424

2525

26-
27-
2826
# The name of the project
29-
name = 'jupyterannotate'
27+
name = "jupyterannotate"
3028

3129
# Get the version
32-
version = get_version(pjoin(name, '_version.py'))
30+
version = get_version(pjoin(name, "_version.py"))
3331

3432

3533
# Representative files that should exist after a successful build
3634
jstargets = [
37-
pjoin(HERE, name, 'nbextension', 'index.js'),
38-
pjoin(HERE, name, 'labextension', 'package.json'),
35+
pjoin(HERE, name, "nbextension", "index.js"),
36+
pjoin(HERE, name, "labextension", "package.json"),
3937
]
4038

4139

42-
package_data_spec = {
43-
name: [
44-
'nbextension/**js*',
45-
'labextension/**'
46-
]
47-
}
40+
package_data_spec = {name: ["nbextension/**js*", "labextension/**"]}
4841

4942

5043
data_files_spec = [
51-
('share/jupyter/nbextensions/jupyterannotate', 'jupyterannotate/nbextension', '**'),
52-
('share/jupyter/labextensions/jupyterannotate', 'jupyterannotate/labextension', '**'),
53-
('share/jupyter/labextensions/jupyterannotate', '.', 'install.json'),
54-
('etc/jupyter/nbconfig/notebook.d', '.', 'jupyterannotate.json'),
44+
("share/jupyter/nbextensions/jupyterannotate", "jupyterannotate/nbextension", "**"),
45+
(
46+
"share/jupyter/labextensions/jupyterannotate",
47+
"jupyterannotate/labextension",
48+
"**",
49+
),
50+
("share/jupyter/labextensions/jupyterannotate", ".", "install.json"),
51+
("etc/jupyter/nbconfig/notebook.d", ".", "jupyterannotate.json"),
5552
]
5653

5754

58-
cmdclass = create_cmdclass('jsdeps', package_data_spec=package_data_spec,
59-
data_files_spec=data_files_spec)
55+
cmdclass = create_cmdclass(
56+
"jsdeps", package_data_spec=package_data_spec, data_files_spec=data_files_spec
57+
)
6058
npm_install = combine_commands(
61-
install_npm(HERE, build_cmd='build:prod'),
59+
install_npm(HERE, build_cmd="build:prod"),
6260
ensure_targets(jstargets),
6361
)
64-
cmdclass['jsdeps'] = skip_if_exists(jstargets, npm_install)
62+
cmdclass["jsdeps"] = skip_if_exists(jstargets, npm_install)
6563

6664

6765
setup_args = dict(
68-
name = name,
69-
description = 'A Custom Jupyter Widget Library',
70-
version = version,
71-
scripts = glob(pjoin('scripts', '*')),
72-
cmdclass = cmdclass,
73-
packages = find_packages(),
74-
author = 'Stuart Quin',
75-
author_email = 'stuart@dataqa.ai',
76-
url = 'https://github.com/DataQA/jupyterannotate',
77-
license = 'BSD',
78-
platforms = "Linux, Mac OS X, Windows",
79-
keywords = ['Jupyter', 'Widgets', 'IPython'],
80-
classifiers = [
81-
'Intended Audience :: Developers',
82-
'Intended Audience :: Science/Research',
83-
'License :: OSI Approved :: BSD License',
84-
'Programming Language :: Python',
85-
'Programming Language :: Python :: 3',
86-
'Programming Language :: Python :: 3.4',
87-
'Programming Language :: Python :: 3.5',
88-
'Programming Language :: Python :: 3.6',
89-
'Programming Language :: Python :: 3.7',
90-
'Framework :: Jupyter',
66+
name=name,
67+
description="A Custom Jupyter Widget Library",
68+
version=version,
69+
scripts=glob(pjoin("scripts", "*")),
70+
cmdclass=cmdclass,
71+
packages=find_packages(),
72+
author="Stuart Quin",
73+
author_email="stuart@dataqa.ai",
74+
url="https://github.com/DataQA/jupyterannotate",
75+
license="BSD",
76+
platforms="Linux, Mac OS X, Windows",
77+
keywords=["Jupyter", "Widgets", "IPython"],
78+
classifiers=[
79+
"Intended Audience :: Developers",
80+
"Intended Audience :: Science/Research",
81+
"License :: OSI Approved :: BSD License",
82+
"Programming Language :: Python",
83+
"Programming Language :: Python :: 3",
84+
"Programming Language :: Python :: 3.4",
85+
"Programming Language :: Python :: 3.5",
86+
"Programming Language :: Python :: 3.6",
87+
"Programming Language :: Python :: 3.7",
88+
"Framework :: Jupyter",
9189
],
92-
include_package_data = True,
90+
include_package_data=True,
9391
python_requires=">=3.6",
94-
install_requires = [
95-
'ipywidgets>=7.0.0',
92+
install_requires=[
93+
"ipywidgets>=7.0.0",
9694
],
97-
extras_require = {
98-
'test': [
99-
'pytest>=4.6',
100-
'pytest-cov',
101-
'nbval',
95+
extras_require={
96+
"test": [
97+
"pytest>=4.6",
98+
"pytest-cov",
99+
"nbval",
102100
],
103-
'examples': [
101+
"examples": [
104102
# Any requirements for the examples to run
105103
],
106-
'docs': [
107-
'jupyter_sphinx',
108-
'nbsphinx',
109-
'nbsphinx-link',
110-
'pytest_check_links',
111-
'pypandoc',
112-
'recommonmark',
113-
'sphinx>=1.5',
114-
'sphinx_rtd_theme',
104+
"docs": [
105+
"jupyter_sphinx",
106+
"nbsphinx",
107+
"nbsphinx-link",
108+
"pytest_check_links",
109+
"pypandoc",
110+
"recommonmark",
111+
"sphinx>=1.5",
112+
"sphinx_rtd_theme",
115113
],
116114
},
117-
entry_points = {
118-
},
115+
entry_points={},
119116
)
120117

121-
if __name__ == '__main__':
118+
if __name__ == "__main__":
122119
setup(**setup_args)

src/__tests__/utils.ts

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// Copyright (c) Jupyter Development Team.
22
// Distributed under the terms of the Modified BSD License.
33

4-
import * as widgets from '@jupyter-widgets/base';
5-
import * as services from '@jupyterlab/services';
4+
import * as widgets from "@jupyter-widgets/base";
5+
import * as services from "@jupyterlab/services";
66

77
let numComms = 0;
88

@@ -28,26 +28,26 @@ export class MockComm implements widgets.IClassicComm {
2828
if (this._on_close) {
2929
this._on_close();
3030
}
31-
return 'dummy';
31+
return "dummy";
3232
}
3333
send(): string {
34-
return 'dummy';
34+
return "dummy";
3535
}
3636

3737
open(): string {
38-
return 'dummy';
38+
return "dummy";
3939
}
4040

4141
comm_id: string;
42-
target_name = 'dummy';
42+
target_name = "dummy";
4343
_on_msg: ((x?: any) => void) | null = null;
4444
_on_close: ((x?: any) => void) | null = null;
4545
}
4646

4747
export class DummyManager extends widgets.ManagerBase<HTMLElement> {
4848
constructor() {
4949
super();
50-
this.el = window.document.createElement('div');
50+
this.el = window.document.createElement("div");
5151
}
5252

5353
display_view(
@@ -59,7 +59,7 @@ export class DummyManager extends widgets.ManagerBase<HTMLElement> {
5959
// TODO: return an html element
6060
return Promise.resolve(view).then((view) => {
6161
this.el.appendChild(view.el);
62-
view.on('remove', () => console.log('view removed', view));
62+
view.on("remove", () => console.log("view removed", view));
6363
return view.el;
6464
});
6565
}
@@ -69,13 +69,13 @@ export class DummyManager extends widgets.ManagerBase<HTMLElement> {
6969
moduleName: string,
7070
moduleVersion: string
7171
): Promise<any> {
72-
if (moduleName === '@jupyter-widgets/base') {
72+
if (moduleName === "@jupyter-widgets/base") {
7373
if ((widgets as any)[className]) {
7474
return Promise.resolve((widgets as any)[className]);
7575
} else {
7676
return Promise.reject(`Cannot find class ${className}`);
7777
}
78-
} else if (moduleName === 'jupyter-datawidgets') {
78+
} else if (moduleName === "jupyter-datawidgets") {
7979
if (this.testClasses[className]) {
8080
return Promise.resolve(this.testClasses[className]);
8181
} else {
@@ -86,11 +86,11 @@ export class DummyManager extends widgets.ManagerBase<HTMLElement> {
8686
}
8787
}
8888

89-
_get_comm_info() {
89+
_get_comm_info(): Promise<any> {
9090
return Promise.resolve({});
9191
}
9292

93-
_create_comm() {
93+
_create_comm(): Promise<MockComm> {
9494
return Promise.resolve(new MockComm());
9595
}
9696

src/extension.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// dynamically.
1111
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
1212
(window as any).__webpack_public_path__ =
13-
document.querySelector('body')!.getAttribute('data-base-url') +
14-
'nbextensions/jupyterannotate';
13+
document.querySelector("body")!.getAttribute("data-base-url") +
14+
"nbextensions/jupyterannotate";
1515

16-
export * from './index';
16+
export * from "./index";

src/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Copyright (c) Stuart Quin
22
// Distributed under the terms of the Modified BSD License.
33

4-
export * from './version';
5-
export * from './widget';
4+
export * from "./version";
5+
export * from "./widget";

src/plugin.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
// Copyright (c) Stuart Quin
22
// Distributed under the terms of the Modified BSD License.
33

4-
import { Application, IPlugin } from '@phosphor/application';
4+
import { Application, IPlugin } from "@phosphor/application";
55

6-
import { Widget } from '@phosphor/widgets';
6+
import { Widget } from "@phosphor/widgets";
77

8-
import { IJupyterWidgetRegistry } from '@jupyter-widgets/base';
8+
import { IJupyterWidgetRegistry } from "@jupyter-widgets/base";
99

10-
import * as widgetExports from './widget';
10+
import * as widgetExports from "./widget";
1111

12-
import { MODULE_NAME, MODULE_VERSION } from './version';
12+
import { MODULE_NAME, MODULE_VERSION } from "./version";
1313

14-
const EXTENSION_ID = 'jupyterannotate:plugin';
14+
const EXTENSION_ID = "jupyterannotate:plugin";
1515

1616
/**
1717
* The example plugin.

src/version.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
55
// @ts-ignore
66
// eslint-disable-next-line @typescript-eslint/no-var-requires
7-
const data = require('../package.json');
7+
const data = require("../package.json");
88

99
/**
1010
* The _model_module_version/_view_module_version this package implements.

0 commit comments

Comments
 (0)