Skip to content

Commit

Permalink
lint dagster_tests (#7594)
Browse files Browse the repository at this point in the history
dont beleive this was intentional

## Test Plan

bk
  • Loading branch information
alangenfeld committed Apr 27, 2022
1 parent f8f87f6 commit 8ecaadf
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 13 deletions.
2 changes: 1 addition & 1 deletion examples/dbt_example/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ commands =

[testenv:pylint]
commands =
pylint -j0 --rcfile=../../pyproject.toml dbt_example/
pylint -j0 --rcfile=../../pyproject.toml dbt_example dbt_example_tests
2 changes: 1 addition & 1 deletion examples/deploy_k8s/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ commands =

[testenv:pylint]
commands =
pylint -j0 --rcfile=../../pyproject.toml example_project
pylint -j0 --rcfile=../../pyproject.toml example_project tests
2 changes: 1 addition & 1 deletion examples/ge_example/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ commands =

[testenv:pylint]
commands =
pylint -j0 --rcfile=../../pyproject.toml ge_example
pylint -j0 --rcfile=../../pyproject.toml ge_example ge_example_tests
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
)
from dagster.core.workspace.context import WorkspaceProcessContext
from dagster.core.workspace.load_target import PythonFileTarget
from dagster.seven import get_system_temp_directory

CONDITIONAL_FAIL_ENV = "DAGSTER_CONDIIONAL_FAIL"

Expand Down Expand Up @@ -94,7 +93,11 @@ def failed_run_fixture(instance):


def test_create_reexecuted_run_from_failure(
instance: DagsterInstance, workspace, repo_location, external_pipeline, failed_run
instance: DagsterInstance,
workspace,
repo_location,
external_pipeline,
failed_run,
):
run = instance.create_reexecuted_run(
failed_run, repo_location, external_pipeline, ReexecutionPolicy.FROM_FAILURE
Expand All @@ -113,7 +116,10 @@ def test_create_reexecuted_run_from_failure(


def test_create_reexecuted_run_from_failure_tags(
instance: DagsterInstance, workspace, repo_location, external_pipeline, failed_run
instance: DagsterInstance,
repo_location,
external_pipeline,
failed_run,
):
run = instance.create_reexecuted_run(
failed_run, repo_location, external_pipeline, ReexecutionPolicy.FROM_FAILURE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
asset,
build_assets_job,
check,
job,
op,
pipeline,
resource,
Expand Down Expand Up @@ -223,11 +222,9 @@ def a_pipe():
**(run_config if run_config else {}),
}

print(instance.get_runs())
pipeline_run = instance.create_run_for_pipeline(
a_pipe, run_id=run_id, run_config=run_config
)
print(instance.get_runs())
result = execute_run(InMemoryPipeline(a_pipe), pipeline_run, instance)

if check_success:
Expand Down Expand Up @@ -328,7 +325,7 @@ def event_log_storage(self, request):
s.dispose()

@pytest.fixture(name="instance")
def instance(self, request) -> Optional[DagsterInstance]:
def instance(self, request) -> Optional[DagsterInstance]: # pylint: disable=unused-argument
return None

@pytest.fixture(scope="function", name="test_run_id")
Expand Down Expand Up @@ -892,7 +889,7 @@ def _solids():
if not storage._instance: # pylint: disable=protected-access
storage.register_instance(created_instance)

events_one, result = _synthesize_events(
events_one, _ = _synthesize_events(
_solids, instance=created_instance, run_id=test_run_id
)

Expand Down Expand Up @@ -1841,7 +1838,7 @@ def solid_partitioned(context):
run_ids = [make_new_run_id() for _ in partitions]
with create_and_delete_test_runs(instance, run_ids):
for partition, run_id in zip([f"partition_{x}" for x in partitions], run_ids):
run_events, result = _synthesize_events(
run_events, _ = _synthesize_events(
lambda: solid_partitioned(),
instance=created_instance,
run_config=get_partitioned_config(partition),
Expand Down
2 changes: 1 addition & 1 deletion python_modules/dagster/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ commands =

[testenv:pylint]
commands =
pylint -j0 --rcfile=../../pyproject.toml dagster
pylint -j0 --rcfile=../../pyproject.toml dagster dagster_tests

0 comments on commit 8ecaadf

Please sign in to comment.