Skip to content
This repository was archived by the owner on Jun 3, 2024. It is now read-only.

Commit f32a236

Browse files
Git hooks, unified lint, black (#777)
1 parent 7dbf19a commit f32a236

15 files changed

+424
-212
lines changed

.circleci/config.yml

-2
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,7 @@ jobs:
3333
. venv/bin/activate
3434
set -eo pipefail
3535
npm ci
36-
npm run format:test
3736
npm run lint
38-
flake8 --ignore=E501,F401,F841,F811,W503 tests
3937
- run:
4038
name: 🔎 Unit Tests
4139
command: |

.flake8

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[flake8]
2+
ignore = C901, E203, E266, E501, E731, W503
3+
select = B,C,E,F,W,T4
4+
per-file-ignores =
5+
tests/*: E722, F811

.huskyrc

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"hooks": {
3+
"pre-commit": "npm run lint"
4+
}
5+
}

dash_core_components_base/__init__.py

+19-23
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
"""This package provides the core React component suite for Dash."""
2-
31
from __future__ import print_function as _
42

53
import json
@@ -29,10 +27,8 @@
2927
file=_sys.stderr)
3028
_sys.exit(1)
3129

32-
33-
from ._imports_ import *
34-
from ._imports_ import __all__
35-
30+
from ._imports_ import * # noqa: F401, F403
31+
from ._imports_ import __all__ # noqa: E402
3632

3733
_current_path = _os.path.dirname(_os.path.abspath(__file__))
3834

@@ -52,24 +48,24 @@
5248
_js_dist = []
5349

5450
_js_dist.extend([{
55-
'relative_package_path': 'async-{}.js'.format(async_resource),
56-
'external_url': (
57-
'https://unpkg.com/dash-core-components@{}'
58-
'/dash_core_components/async-{}.js'
59-
).format(__version__, async_resource),
60-
'namespace': 'dash_core_components',
61-
'async': True
62-
} for async_resource in async_resources])
51+
'relative_package_path': 'async-{}.js'.format(async_resource),
52+
'external_url': (
53+
'https://unpkg.com/dash-core-components@{}'
54+
'/dash_core_components/async-{}.js'
55+
).format(__version__, async_resource),
56+
'namespace': 'dash_core_components',
57+
'async': True
58+
} for async_resource in async_resources])
6359

6460
_js_dist.extend([{
65-
'relative_package_path': 'async-{}.js.map'.format(async_resource),
66-
'external_url': (
67-
'https://unpkg.com/dash-core-components@{}'
68-
'/dash_core_components/async-{}.js.map'
69-
).format(__version__, async_resource),
70-
'namespace': 'dash_core_components',
71-
'dynamic': True
72-
} for async_resource in async_resources])
61+
'relative_package_path': 'async-{}.js.map'.format(async_resource),
62+
'external_url': (
63+
'https://unpkg.com/dash-core-components@{}'
64+
'/dash_core_components/async-{}.js.map'
65+
).format(__version__, async_resource),
66+
'namespace': 'dash_core_components',
67+
'dynamic': True
68+
} for async_resource in async_resources])
7369

7470
_js_dist.extend([
7571
{
@@ -136,4 +132,4 @@
136132
])
137133

138134
for _component in __all__:
139-
setattr(locals()[_component], '_js_dist', _js_dist)
135+
setattr(locals()[_component], '_js_dist', _js_dist)

0 commit comments

Comments
 (0)