Skip to content

Commit 1d6a5b3

Browse files
committed
black (new version)
1 parent 80c94a5 commit 1d6a5b3

File tree

18 files changed

+44
-42
lines changed

18 files changed

+44
-42
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
*.gz
66

7+
*~
8+
79
# Don't ignore dataset files
810
!*.csv.gz
911

packages/python/chart-studio/chart_studio/tests/test_optional/test_utils/test_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def test_column_json_encoding(self):
2727
json_columns = _json.dumps(
2828
columns, cls=_plotly_utils.utils.PlotlyJSONEncoder, sort_keys=True
2929
)
30-
print (json_columns)
30+
print(json_columns)
3131
assert (
3232
'[{"data": [1, 2, 3], "name": "col 1"}, '
3333
'{"data": [1, "A", "2014-01-05T00:00:00", '

packages/python/plotly/_plotly_utils/colors/plotlyjs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@
174174
# Create variable named after each scale that contains the sequence of colors only
175175
for scale_name, scale_pairs in _plotlyjs_scales.items():
176176
scale_sequence = [c[1] for c in scale_pairs]
177-
exec (
177+
exec(
178178
"{scale_name} = {scale_sequence}".format(
179179
scale_name=scale_name, scale_sequence=scale_sequence
180180
)

packages/python/plotly/plotly/_version.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -89,20 +89,20 @@ def run_command(commands, args, cwd=None, verbose=False, hide_stderr=False, env=
8989
if e.errno == errno.ENOENT:
9090
continue
9191
if verbose:
92-
print ("unable to run %s" % dispcmd)
93-
print (e)
92+
print("unable to run %s" % dispcmd)
93+
print(e)
9494
return None, None
9595
else:
9696
if verbose:
97-
print ("unable to find command, tried %s" % (commands,))
97+
print("unable to find command, tried %s" % (commands,))
9898
return None, None
9999
stdout = p.communicate()[0].strip()
100100
if sys.version_info[0] >= 3:
101101
stdout = stdout.decode()
102102
if p.returncode != 0:
103103
if verbose:
104-
print ("unable to run %s (error)" % dispcmd)
105-
print ("stdout was %s" % stdout)
104+
print("unable to run %s (error)" % dispcmd)
105+
print("stdout was %s" % stdout)
106106
return None, p.returncode
107107
return stdout, p.returncode
108108

@@ -131,7 +131,7 @@ def versions_from_parentdir(parentdir_prefix, root, verbose):
131131
root = os.path.dirname(root) # up a level
132132

133133
if verbose:
134-
print (
134+
print(
135135
"Tried directories %s but none started with prefix %s"
136136
% (str(rootdirs), parentdir_prefix)
137137
)
@@ -184,7 +184,7 @@ def git_versions_from_keywords(keywords, tag_prefix, verbose):
184184
refnames = keywords["refnames"].strip()
185185
if refnames.startswith("$Format"):
186186
if verbose:
187-
print ("keywords are unexpanded, not using")
187+
print("keywords are unexpanded, not using")
188188
raise NotThisMethod("unexpanded keywords, not a git-archive tarball")
189189
refs = set([r.strip() for r in refnames.strip("()").split(",")])
190190
# starting in git-1.8.3, tags are listed as "tag: foo-1.0" instead of
@@ -201,15 +201,15 @@ def git_versions_from_keywords(keywords, tag_prefix, verbose):
201201
# "stabilization", as well as "HEAD" and "master".
202202
tags = set([r for r in refs if re.search(r"\d", r)])
203203
if verbose:
204-
print ("discarding '%s', no digits" % ",".join(refs - tags))
204+
print("discarding '%s', no digits" % ",".join(refs - tags))
205205
if verbose:
206-
print ("likely tags: %s" % ",".join(sorted(tags)))
206+
print("likely tags: %s" % ",".join(sorted(tags)))
207207
for ref in sorted(tags):
208208
# sorting will prefer e.g. "2.0" over "2.0rc1"
209209
if ref.startswith(tag_prefix):
210210
r = ref[len(tag_prefix) :]
211211
if verbose:
212-
print ("picking %s" % r)
212+
print("picking %s" % r)
213213
return {
214214
"version": r,
215215
"full-revisionid": keywords["full"].strip(),
@@ -219,7 +219,7 @@ def git_versions_from_keywords(keywords, tag_prefix, verbose):
219219
}
220220
# no suitable tags, so version is "0+unknown", but full hex is still there
221221
if verbose:
222-
print ("no suitable tags, using unknown + full revision id")
222+
print("no suitable tags, using unknown + full revision id")
223223
return {
224224
"version": "0+unknown",
225225
"full-revisionid": keywords["full"].strip(),
@@ -244,7 +244,7 @@ def git_pieces_from_vcs(tag_prefix, root, verbose, run_command=run_command):
244244
out, rc = run_command(GITS, ["rev-parse", "--git-dir"], cwd=root, hide_stderr=True)
245245
if rc != 0:
246246
if verbose:
247-
print ("Directory %s not under git control" % root)
247+
print("Directory %s not under git control" % root)
248248
raise NotThisMethod("'git rev-parse --git-dir' returned error")
249249

250250
# if there is a tag matching tag_prefix, this yields TAG-NUM-gHEX[-dirty]
@@ -301,7 +301,7 @@ def git_pieces_from_vcs(tag_prefix, root, verbose, run_command=run_command):
301301
if not full_tag.startswith(tag_prefix):
302302
if verbose:
303303
fmt = "tag '%s' doesn't start with prefix '%s'"
304-
print (fmt % (full_tag, tag_prefix))
304+
print(fmt % (full_tag, tag_prefix))
305305
pieces["error"] = "tag '%s' doesn't start with prefix '%s'" % (
306306
full_tag,
307307
tag_prefix,

packages/python/plotly/plotly/basedatatypes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ def _ipython_display_(self):
436436
if pio.renderers.render_on_display and pio.renderers.default:
437437
pio.show(self)
438438
else:
439-
print (repr(self))
439+
print(repr(self))
440440

441441
def update(self, dict1=None, overwrite=False, **kwargs):
442442
"""
@@ -1751,7 +1751,7 @@ def print_grid(self):
17511751
raise Exception(
17521752
"Use plotly.tools.make_subplots " "to create a subplot grid."
17531753
)
1754-
print (self._grid_str)
1754+
print(self._grid_str)
17551755

17561756
def append_trace(self, trace, row, col):
17571757
"""

packages/python/plotly/plotly/subplots.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,7 @@ def _checks(item, defaults):
787787

788788
# Handle displaying grid information
789789
if print_grid:
790-
print (grid_str)
790+
print(grid_str)
791791

792792
# Build resulting figure
793793
fig = go.Figure(layout=layout)

packages/python/plotly/plotly/tests/test_core/test_graph_objs/test_instantiate_hierarchy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def test_construct_datatypes(self):
2424
try:
2525
v = obj()
2626
except Exception:
27-
print (
27+
print(
2828
"Failed to construct {obj} in module {module}".format(
2929
obj=obj, module=datatypes_module
3030
)

packages/python/plotly/plotly/tests/test_core/test_graph_objs/test_scatter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414

1515
def test_trivial():
16-
print (Scatter())
16+
print(Scatter())
1717
assert Scatter().to_plotly_json() == dict(type="scatter")
1818

1919

packages/python/plotly/plotly/tests/test_core/test_graph_objs/test_update.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
class TestUpdateMethod(TestCase):
1212
def setUp(self):
13-
print ("Setup!")
13+
print("Setup!")
1414

1515
def test_update_dict(self):
1616
title = "this"

packages/python/plotly/plotly/tests/test_io/test_renderers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ def perform_request(url):
235235
request_responses.append(requests.get(url))
236236

237237
def open_url(url, new=0, autoraise=True):
238-
print ("open url")
238+
print("open url")
239239
# Perform request in thread so that we don't block
240240
request_thread = threading.Thread(target=lambda: perform_request(url))
241241
request_thread.daemon = True

0 commit comments

Comments
 (0)