Changeset 0d47e12 in trunk


Ignore:
Timestamp:
2016-12-24T03:50:48Z (8 years ago)
Author:
Brian Warner <warner@…>
Branches:
master
Children:
b7e76c7
Parents:
7faec2e1
git-author:
Vladimir Rusinov <vrusinov@…> (2016-12-02 16:35:19)
git-committer:
Brian Warner <warner@…> (2016-12-24 03:50:48)
Message:

Add some docstrings.

Location:
src/allmydata
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified src/allmydata/deep_stats.py

    r7faec2e1 r0d47e12  
    5353
    5454    def set_monitor(self, monitor):
     55        """Sets a new monitor."""
    5556        self.monitor = monitor
    5657        monitor.origin_si = self.origin.get_storage_index()
     
    5859
    5960    def add_node(self, node, childpath):
     61        """Adds a node's stats to calculation."""
    6062        if isinstance(node, UnknownNode):
    6163            self.add("count-unknown")
     
    8183
    8284    def enter_directory(self, parent, children):
     85        """Adds directory stats."""
    8386        dirsize_bytes = parent.get_size()
    8487        if dirsize_bytes is not None:
     
    119122
    120123    def get_results(self):
     124        """Returns deep-stats resutls."""
    121125        stats = self.stats.copy()
    122126        for key in self.histograms:
     
    128132
    129133    def finish(self):
     134        """Finishes gathering stats."""
    130135        return self.get_results()
  • TabularUnified src/allmydata/dirnode.py

    r7faec2e1 r0d47e12  
    2929def update_metadata(metadata, new_metadata, now):
    3030    """Updates 'metadata' in-place with the information in 'new_metadata'.
    31     Timestamps are set according to the time 'now'."""
     31
     32    Timestamps are set according to the time 'now'.
     33    """
    3234
    3335    if metadata is None:
  • TabularUnified src/allmydata/test/test_dirnode.py

    r7faec2e1 r0d47e12  
     1"""Tests for the dirnode module."""
     2
    13import time
    24import unicodedata
Note: See TracChangeset for help on using the changeset viewer.