Skip to content

Commit

Permalink
Revert isort Makefile config to use git ls-files (#6845)
Browse files Browse the repository at this point in the history
* revert makefile isort ls-files

* fix
  • Loading branch information
smackesey committed Mar 1, 2022
1 parent d98aa5c commit 5b10719
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
19 changes: 13 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,26 @@ check_black:
-black --check --fast \
examples/docs_snippets


# NOTE: We use `git ls-files` instead of isort's built-in recursive discovery
# because it is much faster. Note that we also need to skip files with `git
# ls-files` (the `:!:` directives are exclued patterns). Even isort
# `--skip`/`--filter-files` is very slow.
isort:
isort \
--skip=examples/docs_snippets --skip=snapshots \
examples integration_tests helm python_modules .buildkite
`git ls-files {.buildkite,examples,integration_tests,helm,python_modules}'/**/*.py' \
':!:examples/docs_snippets' \
':!:snapshots'`
isort \
examples/docs_snippets
`git ls-files 'examples/docs_snippets/**/*.py'`

check_isort:
-isort --check \
--skip=examples/docs_snippets --skip=snapshots \
examples integration_tests helm python_modules .buildkite
`git ls-files {.buildkite,examples,integration_tests,helm,python_modules}'/**/*.py' \
':!:examples/docs_snippets' \
':!:snapshots'`
-isort --check \
examples/docs_snippets
`git ls-files 'examples/docs_snippets/**/*.py'`

yamllint:
yamllint -c .yamllint.yaml --strict `git ls-files 'helm/**/*.yml' 'helm/**/*.yaml' ':!:helm/**/templates/*.yml' ':!:helm/**/templates/*.yaml'`
Expand Down
4 changes: 1 addition & 3 deletions python_modules/dagster/dagster/api/snapshot_repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@
from dagster.serdes import deserialize_as

if TYPE_CHECKING:
from dagster.core.host_representation import RepositoryLocation
from dagster.grpc.client import DagsterGrpcClient
from dagster.core.host_representation import (
RepositoryLocation,
)


def sync_get_streaming_external_repositories_data_grpc(
Expand Down
2 changes: 1 addition & 1 deletion python_modules/dagster/dagster/api/snapshot_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
from dagster.serdes import deserialize_as

if TYPE_CHECKING:
from dagster.grpc.client import DagsterGrpcClient
from dagster.core.instance import DagsterInstance
from dagster.grpc.client import DagsterGrpcClient


def sync_get_external_sensor_execution_data_ephemeral_grpc(
Expand Down

0 comments on commit 5b10719

Please sign in to comment.