Skip to content

Commit

Permalink
Automatically remove unused import (#1574)
Browse files Browse the repository at this point in the history
* Automatically remove unused import

Signed-off-by: Kevin Su <pingsutw@apache.org>

* nit

Signed-off-by: Kevin Su <pingsutw@apache.org>

---------

Signed-off-by: Kevin Su <pingsutw@apache.org>
  • Loading branch information
pingsutw authored Apr 3, 2023
1 parent 9658b02 commit 6530f12
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ setup: install-piptools ## Install requirements

.PHONY: fmt
fmt: ## Format code with black and isort
autoflake --remove-all-unused-imports --ignore-init-module-imports --ignore-pass-after-docstring --in-place -r flytekit plugins tests
pre-commit run black --all-files || true
pre-commit run isort --all-files || true

Expand Down
1 change: 1 addition & 0 deletions dev-requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ scikit-learn
types-protobuf
types-croniter
types-mock
autoflake
1 change: 0 additions & 1 deletion flytekit/clis/flyte_cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1167,7 +1167,6 @@ def terminate_execution(host, insecure, cause, urn=None):
raise _click.UsageError('Missing option "-u" / "--urn" or missing pipe inputs.')
except KeyboardInterrupt:
_sys.stdout.flush()
pass
else:
_terminate_one_execution(client, urn, cause)

Expand Down
1 change: 0 additions & 1 deletion flytekit/core/tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ def find_lhs(self) -> str:
# Since dataframes aren't registrable entities to begin with we swallow any errors they raise and
# continue looping through m.
logger.warning("Caught ValueError {} while attempting to auto-assign name".format(err))
pass

logger.error(f"Could not find LHS for {self} in {self._instantiated_in}")
raise _system_exceptions.FlyteSystemException(f"Error looking for LHS in {self._instantiated_in}")
Expand Down

0 comments on commit 6530f12

Please sign in to comment.