Skip to content

Commit 406c744

Browse files
committed
Lint
1 parent a8f5ad5 commit 406c744

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

packages/python/plotly/setup.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,10 +234,12 @@ def run(self):
234234

235235
perform_codegen()
236236

237+
237238
def overwrite_schema_local(uri):
238239
path = os.path.join(here, "codegen", "resources", "plot-schema.json")
239240
shutil.copyfile(uri, path)
240241

242+
241243
def overwrite_schema(url):
242244
import requests
243245

@@ -247,10 +249,12 @@ def overwrite_schema(url):
247249
with open(path, "wb") as f:
248250
f.write(req.content)
249251

252+
250253
def overwrite_bundle_local(uri):
251254
path = os.path.join(here, "plotly", "package_data", "plotly.min.js")
252255
shutil.copyfile(uri, path)
253256

257+
254258
def overwrite_bundle(url):
255259
import requests
256260

@@ -297,6 +301,7 @@ def request_json(url):
297301
req = requests.get(url)
298302
return json.loads(req.content.decode("utf-8"))
299303

304+
300305
def get_latest_publish_build_info(repo, branch):
301306

302307
url = (
@@ -318,12 +323,14 @@ def get_latest_publish_build_info(repo, branch):
318323
# Extract build info
319324
return {p: build[p] for p in ["vcs_revision", "build_num", "committer_date"]}
320325

326+
321327
def get_bundle_schema_local(local):
322328
plotly_archive = os.path.join(local, "plotly.js.tgz")
323329
plotly_bundle = os.path.join(local, "dist/plotly.min.js")
324330
plotly_schemas = os.path.join(local, "dist/plot-schema.json")
325331
return plotly_archive, plotly_bundle, plotly_schemas
326332

333+
327334
def get_bundle_schema_urls(build_num):
328335
url = (
329336
"https://circleci.com/api/v1.1/project/github/"
@@ -448,7 +455,9 @@ def run(self):
448455
package_json = json.load(f)
449456

450457
# Replace version with bundle url
451-
package_json["dependencies"]["plotly.js"] = archive_url if self.local is None else archive_uri
458+
package_json["dependencies"]["plotly.js"] = (
459+
archive_url if self.local is None else archive_uri
460+
)
452461
with open(package_json_path, "w") as f:
453462
json.dump(package_json, f, indent=2)
454463

@@ -464,7 +473,7 @@ class UpdatePlotlyJsDevCommand(Command):
464473
user_options = [
465474
("devrepo=", None, "Repository name"),
466475
("devbranch=", None, "branch or pull/number"),
467-
("local=", None, "local copy of repo, used by itself")
476+
("local=", None, "local copy of repo, used by itself"),
468477
]
469478

470479
def initialize_options(self):

0 commit comments

Comments
 (0)