Skip to content

Commit

Permalink
Fix autoformatting re: ** operator; un-break CI (for real this time) (#…
Browse files Browse the repository at this point in the history
…218)

* STY: Un-break CI

Oh, apparently it was still running anyway? huh

* STY: black >= 22.1.0; ** formatting

See https://github.com/psf/black/releases/tag/22.1.0. This should
fix the build failing (knock on wood)

* STY: re-format setup.py

this is like trying to cut the heads off a hydra
  • Loading branch information
fedarko authored Feb 22, 2022
1 parent 78bbc6f commit 2e9f7ad
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def get_dims(rl, lp):
area = config.MIN_NODE_AREA + (
rl * (config.MAX_NODE_AREA - config.MIN_NODE_AREA)
)
hgt = area ** lp
hgt = area**lp
wid = area / hgt
return (wid, hgt)

Expand Down Expand Up @@ -99,7 +99,7 @@ def test_compute_node_dimensions_all_lengths_equal():
default_area = config.MIN_NODE_AREA + (
0.5 * (config.MAX_NODE_AREA - config.MIN_NODE_AREA)
)
default_height = default_area ** config.MID_LONGSIDE_PROPORTION
default_height = default_area**config.MID_LONGSIDE_PROPORTION
default_width = default_area / default_height

# This double-checks that the defaults we expect here are computed
Expand Down
7 changes: 6 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,12 @@
"pyfastg",
"jinja2",
],
extras_require={"dev": ["pytest", "pytest-cov", "flake8", "black"]},
# The reason I pin the black version to at least 22.1.0 is that this
# version changes how the ** operator is formatted (no surrounding spaces,
# usually). Not being consistent causes the build to fail, hence the pin.
extras_require={
"dev": ["pytest", "pytest-cov", "flake8", "black>=22.1.0"]
},
entry_points={"console_scripts": ["mgsc=metagenomescope._cli:run_script"]},
zip_safe=False,
)

0 comments on commit 2e9f7ad

Please sign in to comment.