Skip to content

Commit

Permalink
remove (cosmicexplorer)
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmicexplorer committed Sep 10, 2018
1 parent 2257821 commit f30b57e
Show file tree
Hide file tree
Showing 13 changed files with 18 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,8 @@ def register_options(cls, register):
super(SiteGen, cls).register_options(register)
register('--config-path', type=list, help='Path to .json file describing site structure.')

# TODO(cosmicexplorer): requiring these products ensures that the markdown
# and reference tasks run before this one, but we don't use those
# products.
# TODO: requiring these products ensures that the markdown and reference tasks run before this
# one, but we don't use those products.
@classmethod
def prepare(cls, options, round_manager):
round_manager.require(MarkdownToHtml.MARKDOWN_HTML_PRODUCT)
Expand Down
2 changes: 1 addition & 1 deletion src/python/pants/binaries/binary_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
logger = logging.getLogger(__name__)


# TODO(cosmicexplorer): Add integration tests for this file.
# TODO: Add integration tests for this file.
class BinaryToolBase(Subsystem):
"""Base class for subsytems that configure binary tools.
Expand Down
6 changes: 3 additions & 3 deletions src/python/pants/binaries/binary_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,9 +315,9 @@ def __init__(self, baseurls, binary_tool_fetcher, path_by_id=None,
'linux': lambda release, machine: ('linux', machine),
}

# TODO(cosmicexplorer): we create a HostPlatform in this class instead of in the constructor
# because we don't want to fail until a binary is requested. The HostPlatform should be a
# parameter that gets lazily resolved by the v2 engine.
# TODO: we create a HostPlatform in this class instead of in the constructor because we don't want
# to fail until a binary is requested. The HostPlatform should be a parameter that gets lazily
# resolved by the v2 engine.
@memoized_method
def _host_platform(self):
uname_result = self._uname_func()
Expand Down
3 changes: 1 addition & 2 deletions src/python/pants/engine/fs.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,7 @@ class DirectoryToMaterialize(datatype([('path', text_type), ('directory_digest',
FilesContent = Collection.of(FileContent)


# TODO(cosmicexplorer): don't recreate this in python, get this from
# fs::EMPTY_DIGEST somehow.
# TODO: don't recreate this in python, get this from fs::EMPTY_DIGEST somehow.
_EMPTY_FINGERPRINT = 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'


Expand Down
3 changes: 1 addition & 2 deletions src/python/pants/option/parser_hierarchy.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ def all_enclosing_scopes(scope, allow_global=True):

_validate_full_scope(scope)

# TODO(cosmicexplorer): validate scopes here and/or in `enclosing_scope()`
# instead of assuming correctness.
# TODO: validate scopes here and/or in `enclosing_scope()` instead of assuming correctness.
def scope_within_range(tentative_scope):
if tentative_scope is None:
return False
Expand Down
2 changes: 1 addition & 1 deletion src/python/pants/pantsd/watchman_launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def create(cls, bootstrap_options):
baseurls=bootstrap_options.binaries_baseurls,
binary_tool_fetcher=binary_tool_fetcher,
path_by_id=bootstrap_options.binaries_path_by_id,
# TODO(cosmicexplorer): do we need to test this?
# TODO: do we need to test this?
allow_external_binary_tool_downloads=bootstrap_options.allow_external_binary_tool_downloads)

return WatchmanLauncher(
Expand Down
4 changes: 2 additions & 2 deletions src/python/pants/util/objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ def __new__(cls, *args, **kwargs):
except TypeError as e:
raise cls.make_type_error(e)

# TODO(cosmicexplorer): Make this kind of exception pattern (filter for
# errors then display them all at once) more ergonomic.
# TODO: Make this kind of exception pattern (filter for errors then display them all at once)
# more ergonomic.
type_failure_msgs = []
for field_name, field_constraint in fields_with_constraints.items():
field_value = getattr(this_object, field_name)
Expand Down
2 changes: 1 addition & 1 deletion src/python/pants/util/osutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def known_os_names():
return reduce(set.union, OS_ALIASES.values())


# TODO(cosmicexplorer): use this as the default value for the global --binaries-path-by-id option!
# TODO: use this as the default value for the global --binaries-path-by-id option!
# panstd testing fails saying no run trackers were created when I tried to do this.
SUPPORTED_PLATFORM_NORMALIZED_NAMES = {
('linux', 'x86_64'): ('linux', 'x86_64'),
Expand Down
4 changes: 2 additions & 2 deletions src/rust/engine/fs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -417,8 +417,8 @@ pub enum StrictGlobMatching {
}

impl StrictGlobMatching {
// TODO(cosmicexplorer): match this up with the allowed values for the GlobMatchErrorBehavior type
// in python somehow?
// TODO: match this up with the allowed values for the GlobMatchErrorBehavior type in python
// somehow?
pub fn create(behavior: &str) -> Result<Self, String> {
match behavior {
"ignore" => Ok(StrictGlobMatching::Ignore),
Expand Down
4 changes: 2 additions & 2 deletions src/rust/engine/src/nodes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1037,8 +1037,8 @@ impl Node for NodeKey {
fn typstr(tc: &TypeConstraint) -> String {
externs::key_to_str(&tc.0)
}
// TODO(cosmicexplorer): these should all be converted to fmt::Debug implementations, and then
// this method can go away in favor of the auto-derived Debug for this type.
// TODO: these should all be converted to fmt::Debug implementations, and then this method can
// go away in favor of the auto-derived Debug for this type.
match self {
&NodeKey::DigestFile(ref s) => format!("DigestFile({:?})", s.0),
&NodeKey::ExecuteProcess(ref s) => format!("ExecuteProcess({:?}", s.0),
Expand Down
3 changes: 1 addition & 2 deletions tests/python/pants_test/binaries/test_binary_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ def _select_for_version(self, version):
return BinaryUtilFakeUname.Factory._create_for_cls(BinaryUtilFakeUname).select(binary_request)


# TODO(cosmicexplorer): these should have integration tests which use BinaryTool subclasses
# overriding archive_type
# TODO: these should have integration tests which use BinaryTool subclasses overriding archive_type.
class BinaryToolBaseTest(BaseTest):

def setUp(self):
Expand Down
2 changes: 1 addition & 1 deletion tests/python/pants_test/binaries/test_binary_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def __str__(self):
return 'ExternalUrlGenerator(<example __str__()>)'


# TODO(cosmicexplorer): test requests with an archiver!
# TODO: test requests with an archiver!
class BinaryUtilTest(TestBase):
"""Tests binary_util's binaries_baseurls handling."""

Expand Down
2 changes: 0 additions & 2 deletions tests/python/pants_test/engine/test_isolated_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,6 @@ def test_blows_up_on_invalid_args(self):
with self.assertRaises(TypeCheckError):
self._default_args_execute_process_request(argv=('1',), env=['foo', 'bar'])

# TODO(cosmicexplorer): we should probably check that the digest info in
# ExecuteProcessRequest is valid, beyond just checking if it's a string.
with self.assertRaisesRegexp(TypeCheckError, "env"):
ExecuteProcessRequest(
argv=('1',),
Expand Down

0 comments on commit f30b57e

Please sign in to comment.