Skip to content

Commit

Permalink
Fix --disable-shapely
Browse files Browse the repository at this point in the history
  • Loading branch information
kageurufu committed Sep 23, 2021
1 parent 8939875 commit 08a9ed4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 13 deletions.
2 changes: 1 addition & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 1 addition & 8 deletions preprocess_cancellation.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,6 @@
shapely = None


def sizeof_fmt(num, suffix="B"):
for unit in ["", "Ki", "Mi", "Gi", "Ti", "Pi", "Ei", "Zi"]:
if abs(num) < 1024.0:
return f"{num:3.1f}{unit}{suffix}"
num /= 1024.0
return f"{num:.1f}Yi{suffix}"


HEADER_MARKER = "; Pre-Processed for Cancel-Object support\n"


Expand Down Expand Up @@ -496,6 +488,7 @@ def _main():

args = argparser.parse_args()
if args.disable_shapely:
global shapely
shapely = None

for filename in args.gcode:
Expand Down
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
line_length = 120

[tool.pytest.ini_options]
addopts = '-v --cov'
addopts = '-v --cov=preprocess_cancellation'

[tool.coverage.run]
source = "./"
branch = true

[tool.poetry]
name = "preprocess_cancellation"
version = "0.1.1"
version = "0.1.2"
description = "GCode processor to add klipper cancel-object markers"
authors = ["Franklyn Tackitt <[email protected]>"]
repository = "https://github.com/kageurufu/cancelobject-preprocessor"
Expand All @@ -26,7 +26,7 @@ shapely = "*"

[tool.poetry.dev-dependencies]
black = "*"
coverage = "*"
coverage = { version = "*", extras = ["toml"] }
isort = "*"
matplotlib = "*"
pyinstaller = "*"
Expand Down

0 comments on commit 08a9ed4

Please sign in to comment.