Skip to content

Commit

Permalink
passing black and lint
Browse files Browse the repository at this point in the history
  • Loading branch information
BSd3v committed Feb 7, 2024
1 parent 75647b5 commit 7cb5fda
Show file tree
Hide file tree
Showing 12 changed files with 210 additions and 124 deletions.
12 changes: 6 additions & 6 deletions @plotly/dash-generator-test-component-nested/base/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@
import os as _os

_basepath = _os.path.dirname(__file__)
_filepath = _os.path.abspath(_os.path.join(_basepath, 'package.json'))
_filepath = _os.path.abspath(_os.path.join(_basepath, "package.json"))
with open(_filepath) as f:
package = json.load(f)

package_name = package['name'].replace(' ', '_').replace('-', '_')
__version__ = package['version']
package_name = package["name"].replace(" ", "_").replace("-", "_")
__version__ = package["version"]

from ._imports_ import * # noqa: F401, F403
from ._imports_ import __all__ # noqa: E402

_js_dist = [
dict(
relative_package_path='nested/dash_generator_test_component_nested.js',
namespace='dash_generator_test_component_nested'
relative_package_path="nested/dash_generator_test_component_nested.js",
namespace="dash_generator_test_component_nested",
)
]

for _component in __all__:
setattr(locals()[_component], '_js_dist', _js_dist)
setattr(locals()[_component], "_js_dist", _js_dist)
10 changes: 5 additions & 5 deletions @plotly/dash-generator-test-component-nested/setup.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
from setuptools import setup
import json

with open('package.json') as f:
with open("package.json") as f:
package = json.load(f)

package_name = str(package["name"].replace(" ", "_").replace("-", "_"))

setup(
name=package_name,
version=package["version"],
author=package['author'],
author_email='chris@plotly.com',
author=package["author"],
author_email="chris@plotly.com",
packages=[package_name],
include_package_data=True,
license=package['license'],
license=package["license"],
description=package.get("description", package_name),
install_requires=[]
install_requires=[],
)
26 changes: 13 additions & 13 deletions @plotly/dash-generator-test-component-standard/base/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,35 @@
import os as _os

_basepath = _os.path.dirname(__file__)
_filepath = _os.path.abspath(_os.path.join(_basepath, 'package.json'))
_filepath = _os.path.abspath(_os.path.join(_basepath, "package.json"))
with open(_filepath) as f:
package = json.load(f)

package_name = package['name'].replace(' ', '_').replace('-', '_')
__version__ = package['version']
package_name = package["name"].replace(" ", "_").replace("-", "_")
__version__ = package["version"]

from ._imports_ import * # noqa: F401, F403
from ._imports_ import __all__ # noqa: E402

_js_dist = [
dict(
relative_package_path='dash_generator_test_component_standard.js',
namespace='dash_generator_test_component_standard'
relative_package_path="dash_generator_test_component_standard.js",
namespace="dash_generator_test_component_standard",
),
dict(
relative_package_path='godfather.ttf',
namespace='dash_generator_test_component_standard',
dynamic=True
)
relative_package_path="godfather.ttf",
namespace="dash_generator_test_component_standard",
dynamic=True,
),
]

_css_dist = [
dict(
relative_package_path='style.css',
namespace='dash_generator_test_component_standard'
relative_package_path="style.css",
namespace="dash_generator_test_component_standard",
)
]

for _component in __all__:
setattr(locals()[_component], '_js_dist', _js_dist)
setattr(locals()[_component], '_css_dist', _css_dist)
setattr(locals()[_component], "_js_dist", _js_dist)
setattr(locals()[_component], "_css_dist", _css_dist)
10 changes: 5 additions & 5 deletions @plotly/dash-generator-test-component-standard/setup.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
from setuptools import setup
import json

with open('package.json') as f:
with open("package.json") as f:
package = json.load(f)

package_name = str(package["name"].replace(" ", "_").replace("-", "_"))

setup(
name=package_name,
version=package["version"],
author=package['author'],
author_email='chris@plotly.com',
author=package["author"],
author_email="chris@plotly.com",
packages=[package_name],
include_package_data=True,
license=package['license'],
license=package["license"],
description=package.get("description", package_name),
install_requires=[]
install_requires=[],
)
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@
import os as _os

_basepath = _os.path.dirname(__file__)
_filepath = _os.path.abspath(_os.path.join(_basepath, 'package.json'))
_filepath = _os.path.abspath(_os.path.join(_basepath, "package.json"))
with open(_filepath) as f:
package = json.load(f)

package_name = package['name'].replace(' ', '_').replace('-', '_')
__version__ = package['version']
package_name = package["name"].replace(" ", "_").replace("-", "_")
__version__ = package["version"]

from ._imports_ import * # noqa: F401, F403
from ._imports_ import __all__ # noqa: E402

_js_dist = [
dict(
relative_package_path='dash_generator_test_component_typescript.js',
namespace='dash_generator_test_component_typescript'
relative_package_path="dash_generator_test_component_typescript.js",
namespace="dash_generator_test_component_typescript",
)
]

for _component in __all__:
setattr(locals()[_component], '_js_dist', _js_dist)
setattr(locals()[_component], "_js_dist", _js_dist)
10 changes: 5 additions & 5 deletions @plotly/dash-generator-test-component-typescript/setup.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
from setuptools import setup
import json

with open('package.json') as f:
with open("package.json") as f:
package = json.load(f)

package_name = str(package["name"].replace(" ", "_").replace("-", "_"))

setup(
name=package_name,
version=package["version"],
author=package['author'],
author_email='chris@plotly.com',
author=package["author"],
author_email="chris@plotly.com",
packages=[package_name],
include_package_data=True,
license=package['license'],
license=package["license"],
description=package.get("description", package_name),
install_requires=[]
install_requires=[],
)
12 changes: 12 additions & 0 deletions @plotly/dash-jupyterlab/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -977,6 +977,18 @@ minimist@^1.2.5, minimist@~1.2.0:
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602"
integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==

minimist@^1.2.6:
version "1.2.8"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c"
integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==

mkdirp@^0.5.1:
version "0.5.6"
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.6.tgz#7def03d2432dcae4ba1d611445c48396062255f6"
integrity sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==
dependencies:
minimist "^1.2.6"

moment@^2.24.0:
version "2.24.0"
resolved "https://registry.yarnpkg.com/moment/-/moment-2.24.0.tgz#0d055d53f5052aa653c9f6eb68bb5d12bf5c2b5b"
Expand Down
10 changes: 5 additions & 5 deletions @plotly/dash-test-components/base/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@
import os as _os

_basepath = _os.path.dirname(__file__)
_filepath = _os.path.abspath(_os.path.join(_basepath, 'package.json'))
_filepath = _os.path.abspath(_os.path.join(_basepath, "package.json"))
with open(_filepath) as f:
package = json.load(f)

package_name = package['name'].replace(' ', '_').replace('-', '_')
__version__ = package['version']
package_name = package["name"].replace(" ", "_").replace("-", "_")
__version__ = package["version"]

from ._imports_ import * # noqa: F401, F403
from ._imports_ import __all__ # noqa: E402

_js_dist = [
{
"relative_package_path": "dash_test_components.js",
"namespace": "dash_test_components"
"namespace": "dash_test_components",
},
{
"relative_package_path": "async-test-async.js",
Expand All @@ -25,4 +25,4 @@
]

for _component in __all__:
setattr(locals()[_component], '_js_dist', _js_dist)
setattr(locals()[_component], "_js_dist", _js_dist)
10 changes: 5 additions & 5 deletions @plotly/dash-test-components/setup.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
from setuptools import setup
import json

with open('package.json') as f:
with open("package.json") as f:
package = json.load(f)

package_name = str(package["name"].replace(" ", "_").replace("-", "_"))

setup(
name=package_name,
version=package["version"],
author=package['author'],
author_email='chris@plotly.com',
author=package["author"],
author_email="chris@plotly.com",
packages=[package_name],
include_package_data=True,
license=package['license'],
license=package["license"],
description=package.get("description", package_name),
install_requires=[]
install_requires=[],
)
Original file line number Diff line number Diff line change
Expand Up @@ -1080,4 +1080,4 @@
"value"
]
}
}
}
38 changes: 21 additions & 17 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
from setuptools import setup, find_packages

main_ns = {}
exec(open("dash/version.py", encoding="utf-8").read(), main_ns) # pylint: disable=exec-used, consider-using-with
exec(
open("dash/version.py", encoding="utf-8").read(), main_ns
) # pylint: disable=exec-used, consider-using-with


def read_req_file(req_type):
Expand All @@ -20,10 +22,11 @@ def read_req_file(req_type):
include_package_data=True,
license="MIT",
description=(
"A Python framework for building reactive web-apps. "
"Developed by Plotly."
"A Python framework for building reactive web-apps. " "Developed by Plotly."
),
long_description=io.open("README.md", encoding="utf-8").read(), # pylint: disable=consider-using-with
long_description=io.open(
"README.md", encoding="utf-8"
).read(), # pylint: disable=consider-using-with
long_description_content_type="text/markdown",
install_requires=read_req_file("install"),
python_requires=">=3.6",
Expand All @@ -33,14 +36,13 @@ def read_req_file(req_type):
"testing": read_req_file("testing"),
"celery": read_req_file("celery"),
"diskcache": read_req_file("diskcache"),
"compress": read_req_file("compress")
"compress": read_req_file("compress"),
},
entry_points={
"console_scripts": [
"dash-generate-components = "
"dash.development.component_generator:cli",
"dash-generate-components = " "dash.development.component_generator:cli",
"renderer = dash.development.build_process:renderer",
"dash-update-components = dash.development.update_components:cli"
"dash-update-components = dash.development.update_components:cli",
],
"pytest11": ["dash = dash.testing.plugin"],
},
Expand Down Expand Up @@ -77,16 +79,18 @@ def read_req_file(req_type):
],
data_files=[
# like `jupyter nbextension install --sys-prefix`
("share/jupyter/nbextensions/dash", [
"dash/nbextension/main.js",
]),
(
"share/jupyter/nbextensions/dash",
[
"dash/nbextension/main.js",
],
),
# like `jupyter nbextension enable --sys-prefix`
("etc/jupyter/nbconfig/notebook.d", [
"dash/nbextension/dash.json"
]),
("etc/jupyter/nbconfig/notebook.d", ["dash/nbextension/dash.json"]),
# Place jupyterlab extension in extension directory
("share/jupyter/lab/extensions", [
"dash/labextension/dist/dash-jupyterlab.tgz"
]),
(
"share/jupyter/lab/extensions",
["dash/labextension/dist/dash-jupyterlab.tgz"],
),
],
)
Loading

0 comments on commit 7cb5fda

Please sign in to comment.