Skip to content

Commit

Permalink
Apply black linter fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Naman Jain committed Nov 4, 2022
1 parent 3fd362e commit 117ea57
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion bionic/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@
from . import protocol # noqa: F401
from . import util # noqa: F401

__version__ = u"0.11.0"
__version__ = "0.11.0"
16 changes: 8 additions & 8 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@

# -- Project information -----------------------------------------------------

project = u"bionic"
copyright = u"2019, Square"
author = u"Janek Klawe"
project = "bionic"
copyright = "2019, Square"
author = "Janek Klawe"

# The short X.Y version
version = u"0.11.0"
version = "0.11.0"
# The full version, including alpha/beta/rc tags
release = version

Expand Down Expand Up @@ -67,7 +67,7 @@
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = [
u"_build",
"_build",
"Thumbs.db",
".DS_Store",
"**.ipynb_checkpoints",
Expand Down Expand Up @@ -135,15 +135,15 @@
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, "bionic.tex", u"bionic Documentation", u"Janek Klawe", "manual"),
(master_doc, "bionic.tex", "bionic Documentation", "Janek Klawe", "manual"),
]


# -- Options for manual page output ------------------------------------------

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [(master_doc, "bionic", u"bionic Documentation", [author], 1)]
man_pages = [(master_doc, "bionic", "bionic Documentation", [author], 1)]


# -- Options for Texinfo output ----------------------------------------------
Expand All @@ -155,7 +155,7 @@
(
master_doc,
"bionic",
u"bionic Documentation",
"bionic Documentation",
author,
"bionic",
"One line description of project.",
Expand Down
2 changes: 1 addition & 1 deletion tests/test_code_hasher.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def dec_with_one(x):
return x - one()

def quadratic_eq(a, b, c):
d = b ** 2 - 4 * a * c
d = b**2 - 4 * a * c
s1 = (b - cmath.sqrt(d)) / (2 * a)
s2 = (-b - cmath.sqrt(d)) / (2 * a)
return (s1, s2)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_flow/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ def real_gcs_session_tmp_url_prefix(real_gcs_url_stem) -> Optional[str]:

gcs_fs = get_gcs_fs_without_warnings()

random_hex_str = "%016x" % random.randint(0, 2 ** 64)
random_hex_str = "%016x" % random.randint(0, 2**64)
path_str = f"{getpass.getuser()}/BNTESTDATA/{random_hex_str}"

gs_url = real_gcs_url_stem + "/" + path_str + "/"
Expand Down
4 changes: 2 additions & 2 deletions tests/test_flow/test_cache_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def xy(x, y):

@builder
def xy_squared(xy):
return xy ** 2
return xy**2

return builder.build()

Expand Down Expand Up @@ -134,7 +134,7 @@ def test_get_entries(preset_flow):
@builder # noqa: F811
@bn.version(1)
def xy(x, y): # noqa: F811
return x ** y
return x**y

tester.flow = builder.build()

Expand Down
2 changes: 1 addition & 1 deletion tests/test_flow/test_interactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def xs(n):

@builder
def ys(xs):
return [x ** 2 for x in xs]
return [x**2 for x in xs]

return builder

Expand Down
4 changes: 2 additions & 2 deletions tests/test_flow/test_merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def merge_tester(builder):

@fb
def x(root_x):
return root_x ** 2
return root_x**2

tester.add("DerivedSingle", fb.build())

Expand Down Expand Up @@ -167,7 +167,7 @@ def x(x_y): # noqa: F811
@fb # noqa: F811
@bn.persist(False)
def x(root_x): # noqa: F811
return root_x ** 2
return root_x**2

tester.add("DS", fb.build())

Expand Down
14 changes: 7 additions & 7 deletions tests/test_flow/test_persistence.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ def f(x, y): # noqa: F811
@bn.version_no_warnings(major=1, minor=1)
def f(x, y): # noqa: F811
call_counter.mark()
return x ** y
return x**y

assert builder.build().get("f") == 6
assert call_counter.times_called() == 0
Expand All @@ -291,7 +291,7 @@ def f(x, y): # noqa: F811
@bn.version_no_warnings(major=2)
def f(x, y): # noqa: F811
call_counter.mark()
return x ** y
return x**y

assert builder.build().get("f") == 8
assert call_counter.times_called() == 1
Expand Down Expand Up @@ -435,7 +435,7 @@ def f(x, y): # noqa: F811
@bn.version_no_warnings(major=1, minor=1)
def f(x, y): # noqa: F811
call_counter.mark()
return x ** y
return x**y

with raises_versioning_error_for_entity("f"):
builder.build().get("f")
Expand All @@ -446,7 +446,7 @@ def f(x, y): # noqa: F811
@bn.version_no_warnings(major=2)
def f(x, y): # noqa: F811
call_counter.mark()
return x ** y
return x**y

assert builder.build().get("f") == 8
assert call_counter.times_called() == 1
Expand Down Expand Up @@ -504,7 +504,7 @@ def f(x, y): # noqa: F811
assert call_counter.times_called() == 0

def op(x, y): # noqa: F811
return x ** y
return x**y

with raises_versioning_error_for_entity("f"):
builder.build().get("f")
Expand Down Expand Up @@ -733,7 +733,7 @@ def f(x, y): # noqa: F811
@bn.version_no_warnings(major=1, minor=1)
def f(x, y): # noqa: F811
call_counter.mark()
return x ** y
return x**y

assert builder.build().get("f") == 8
assert call_counter.times_called() == 1
Expand All @@ -744,7 +744,7 @@ def f(x, y): # noqa: F811
@bn.version_no_warnings(major=2)
def f(x, y): # noqa: F811
call_counter.mark()
return x ** y
return x**y

assert builder.build().get("f") == 8
assert call_counter.times_called() == 1
Expand Down
6 changes: 3 additions & 3 deletions tests/test_flow/test_persistence_gcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ def xy(x, y): # noqa: F811
@bn.version_no_warnings(major=1)
def xy(x, y): # noqa: F811
call_counter.mark()
return x ** y
return x**y

flow = builder.build()

Expand All @@ -200,7 +200,7 @@ def test_indirect_versioning(preset_gcs_builder, make_counter):
@bn.version_no_warnings(major=1)
def xy(x, y):
call_counter.mark()
return x ** y
return x**y

flow = builder.build()
assert flow.get("xy") == 8
Expand Down Expand Up @@ -240,7 +240,7 @@ def xy(x, y): # noqa: F811
@bn.version_no_warnings(major=2)
def xy(x, y): # noqa: F811
call_counter.mark()
return y ** x
return y**x

flow = builder.build()

Expand Down

0 comments on commit 117ea57

Please sign in to comment.