Skip to content

Commit

Permalink
Fix stray type error in fs.py (#10182)
Browse files Browse the repository at this point in the history
[ci skip-rust-tests]
  • Loading branch information
stuhood committed Jun 27, 2020
1 parent 41f4bfc commit e5f6c9c
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions src/python/pants/engine/fs.py
Expand Up @@ -4,7 +4,7 @@
import os
from dataclasses import dataclass
from pathlib import Path
from typing import TYPE_CHECKING, Iterable, Optional, Tuple
from typing import Any, Iterable, Optional, Tuple

from pants.engine.collection import Collection
from pants.engine.rules import RootRule, side_effecting
Expand All @@ -18,9 +18,6 @@
)
from pants.util.meta import frozen_after_init

if TYPE_CHECKING:
from pants.engine.internals.scheduler import SchedulerSession


@dataclass(frozen=True)
class FileContent:
Expand Down Expand Up @@ -285,11 +282,10 @@ class UrlToFetch:
class Workspace:
"""Abstract handle for operations that touch the real local filesystem."""

_scheduler: "SchedulerSession"
# TODO: SchedulerSession. Untyped because `fs.py` and `scheduler.py` have a cycle.
_scheduler: Any

def materialize_directory(
self, directory_to_materialize: DirectoryToMaterialize
) -> MaterializeDirectoryResult:
def materialize_directory(self, directory_to_materialize: DirectoryToMaterialize):
"""Materialize one single directory digest to disk.
If you need to materialize multiple, you should use the parallel materialize_directories()
Expand All @@ -299,7 +295,7 @@ def materialize_directory(

def materialize_directories(
self, directories_to_materialize: Tuple[DirectoryToMaterialize, ...]
) -> MaterializeDirectoriesResult:
):
"""Materialize multiple directory digests to disk in parallel."""
return self._scheduler.materialize_directories(directories_to_materialize)

Expand Down

0 comments on commit e5f6c9c

Please sign in to comment.