Skip to content

Commit d21a365

Browse files
authored
Merge pull request #1729 from plotly/more-hljs-langs
More hljs langs
2 parents d9568e9 + 74c0149 commit d21a365

File tree

21 files changed

+50
-27
lines changed

21 files changed

+50
-27
lines changed

.pylintrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ disable=fixme,
6868
superfluous-parens,
6969
bad-continuation,
7070
line-too-long,
71-
bad-option-value
71+
bad-option-value,
72+
unspecified-encoding
7273

7374

7475
# Enable the message, report, category or checker with the given id(s). You can

.pylintrc39

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,8 @@ disable=invalid-name,
159159
line-too-long,
160160
super-with-arguments,
161161
raise-missing-from,
162-
bad-option-value
162+
bad-option-value,
163+
unspecified-encoding
163164

164165
# Enable the message, report, category or checker with the given id(s). You can
165166
# either give multiple identifier separated by comma (,) or put this option

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,16 @@ This project adheres to [Semantic Versioning](https://semver.org/).
1414
- [#1679](https://github.com/plotly/dash/pull/1679) Restructure `dash`, `dash-core-components`, `dash-html-components`, and `dash-table` into a singular monorepo and move component packages into `dash`. This change makes the component modules available for import within the `dash` namespace, and simplifies the import pattern for a Dash app. From a development standpoint, all future changes to component modules will be made within the `components` directory, and relevant packages updated with the `dash-update-components` CLI command.
1515
- [#1707](https://github.com/plotly/dash/pull/1707) Change the default value of the `compress` argument to the `dash.Dash` constructor to `False`. This change reduces CPU usage, and was made in recognition of the fact that many deployment platforms (e.g. Dash Enterprise) already apply their own compression. If deploying to an environment that does not already provide compression, the Dash 1 behavior may be restored by adding `compress=True` to the `dash.Dash` constructor.
1616

17+
## Dash Core Components
18+
### Added
19+
20+
- [#1729](https://github.com/plotly/dash/pull/1729) Include F#, C#, and MATLAB in markdown code highlighting, for the upcoming .NET and MATLAB flavors of dash.
21+
22+
## Dash Table
23+
### Added
24+
25+
- [#1729](https://github.com/plotly/dash/pull/1729) Include F#, C#, and MATLAB in markdown code highlighting, for the upcoming .NET and MATLAB flavors of dash.
26+
1727
## [1.21.0] - 2021-07-09
1828

1929
## Dash and Dash Renderer

components/dash-core-components/src/third-party/highlight.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,15 @@ import highlightjs from 'highlight.js/lib/core';
22
import 'highlight.js/styles/github.css';
33

44
import bash from 'highlight.js/lib/languages/bash';
5+
import csharp from 'highlight.js/lib/languages/csharp';
56
import css from 'highlight.js/lib/languages/css';
7+
import fsharp from 'highlight.js/lib/languages/fsharp';
68
import http from 'highlight.js/lib/languages/http';
79
import javascript from 'highlight.js/lib/languages/javascript';
810
import json from 'highlight.js/lib/languages/json';
911
import julia from 'highlight.js/lib/languages/julia';
1012
import markdown from 'highlight.js/lib/languages/markdown';
13+
import matlab from 'highlight.js/lib/languages/matlab';
1114
import plaintext from 'highlight.js/lib/languages/plaintext';
1215
import python from 'highlight.js/lib/languages/python';
1316
import r from 'highlight.js/lib/languages/r';
@@ -18,12 +21,15 @@ import xml from 'highlight.js/lib/languages/xml';
1821
import yaml from 'highlight.js/lib/languages/yaml';
1922

2023
highlightjs.registerLanguage('bash', bash);
24+
highlightjs.registerLanguage('csharp', csharp);
2125
highlightjs.registerLanguage('css', css);
26+
highlightjs.registerLanguage('fsharp', fsharp);
2227
highlightjs.registerLanguage('http', http);
2328
highlightjs.registerLanguage('javascript', javascript);
2429
highlightjs.registerLanguage('json', json);
2530
highlightjs.registerLanguage('julia', julia);
2631
highlightjs.registerLanguage('markdown', markdown);
32+
highlightjs.registerLanguage('matlab', matlab);
2733
highlightjs.registerLanguage('plaintext', plaintext);
2834
highlightjs.registerLanguage('python', python);
2935
highlightjs.registerLanguage('r', r);

components/dash-table/src/third-party/highlight.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,15 @@ import highlightjs from 'highlight.js/lib/core';
22
import 'highlight.js/styles/github.css';
33

44
import bash from 'highlight.js/lib/languages/bash';
5+
import csharp from 'highlight.js/lib/languages/csharp';
56
import css from 'highlight.js/lib/languages/css';
7+
import fsharp from 'highlight.js/lib/languages/fsharp';
68
import http from 'highlight.js/lib/languages/http';
79
import javascript from 'highlight.js/lib/languages/javascript';
810
import json from 'highlight.js/lib/languages/json';
911
import julia from 'highlight.js/lib/languages/julia';
1012
import markdown from 'highlight.js/lib/languages/markdown';
13+
import matlab from 'highlight.js/lib/languages/matlab';
1114
import plaintext from 'highlight.js/lib/languages/plaintext';
1215
import python from 'highlight.js/lib/languages/python';
1316
import r from 'highlight.js/lib/languages/r';
@@ -18,12 +21,15 @@ import xml from 'highlight.js/lib/languages/xml';
1821
import yaml from 'highlight.js/lib/languages/yaml';
1922

2023
highlightjs.registerLanguage('bash', bash);
24+
highlightjs.registerLanguage('csharp', csharp);
2125
highlightjs.registerLanguage('css', css);
26+
highlightjs.registerLanguage('fsharp', fsharp);
2227
highlightjs.registerLanguage('http', http);
2328
highlightjs.registerLanguage('javascript', javascript);
2429
highlightjs.registerLanguage('json', json);
2530
highlightjs.registerLanguage('julia', julia);
2631
highlightjs.registerLanguage('markdown', markdown);
32+
highlightjs.registerLanguage('matlab', matlab);
2733
highlightjs.registerLanguage('plaintext', plaintext);
2834
highlightjs.registerLanguage('python', python);
2935
highlightjs.registerLanguage('r', r);

dash/_validate.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,11 +138,11 @@ def validate_and_group_input_args(flat_args, arg_index_grouping):
138138
func_kwargs = args_grouping
139139
elif isinstance(arg_index_grouping, (tuple, list)):
140140
func_args = list(args_grouping)
141-
func_kwargs = dict()
141+
func_kwargs = {}
142142
else:
143143
# Scalar input
144144
func_args = [args_grouping]
145-
func_kwargs = dict()
145+
func_kwargs = {}
146146

147147
return func_args, func_kwargs
148148

dash/dash.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1079,12 +1079,11 @@ def long_callback(self, *_args, **_kwargs): # pylint: disable=too-many-statemen
10791079
this should be a list of argument names as strings. Otherwise,
10801080
this should be a list of argument indices as integers.
10811081
"""
1082-
from dash._callback_context import ( # pylint: disable=import-outside-toplevel
1083-
callback_context,
1084-
)
1085-
from dash.exceptions import ( # pylint: disable=import-outside-toplevel
1086-
WildcardInLongCallback,
1087-
)
1082+
# pylint: disable-next=import-outside-toplevel
1083+
from dash._callback_context import callback_context
1084+
1085+
# pylint: disable-next=import-outside-toplevel
1086+
from dash.exceptions import WildcardInLongCallback
10881087

10891088
# Get long callback manager
10901089
callback_manager = _kwargs.pop("manager", self._long_callback_manager)
@@ -1140,7 +1139,7 @@ def long_callback(self, *_args, **_kwargs): # pylint: disable=too-many-statemen
11401139
id=interval_id, interval=interval_time, disabled=prevent_initial_call
11411140
)
11421141
store_id = f"_long_callback_store_{long_callback_id}"
1143-
store_component = dcc.Store(id=store_id, data=dict())
1142+
store_component = dcc.Store(id=store_id, data={})
11441143
self._extra_components.extend([interval_component, store_component])
11451144

11461145
# Compute full component plus property name for the cancel dependencies

dash/dash_table/async-highlight.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dash/dash_table/async-highlight.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dash/dash_table/bundle.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)