Changeset 1745:2402b8a75178


Ignore:
Timestamp:
Dec 29, 2018, 9:49:25 PM (3 weeks ago)
Author:
Stefan Schwarzer <sschwarzer@…>
Branch:
default
Message:
Unify formatting of XXX-style comments

Use consistent format `# XXX: ...` for all FIXME, TODO and XXX
comments.
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • Makefile

    r1740 r1745  
    2626PYTHONPATH=${PROJECT_DIR}:${TEST_DIR}
    2727
    28 #TODO Some platforms call that script rst2html.py - allow both.
     28# TODO: Some platforms call that script rst2html.py - allow both.
    2929RST2HTML=rst2html
    3030
  • ftputil/file_transfer.py

    r1718 r1745  
    1212
    1313
    14 #TODO Think a bit more about the API before making it public.
     14# TODO: Think a bit more about the API before making it public.
    1515# # Only `chunks` should be used by clients of the ftputil library. Any
    1616# #  other functionality is supposed to be used via `FTPHost` objects.
  • ftputil/host.py

    r1739 r1745  
    6262        self._args = args
    6363        self._kwargs = kwargs
    64         #XXX Maybe put the following in a `reset` method.
     64        # XXX: Maybe put the following in a `reset` method.
    6565        # The time shift setting shouldn't be reset though.
    6666        # Make a session according to these arguments.
     
    142142        there aren't any.
    143143        """
    144         #TODO: Currently timed-out child sessions aren't removed and
     144        # TODO: Currently timed-out child sessions aren't removed and
    145145        # may collect over time. In very busy or long running
    146146        # processes, this might slow down an application because the
     
    694694            raise ftputil.error.PermanentError("directory '{}' not empty".
    695695                                               format(path))
    696         #XXX How does `rmd` work with links?
     696        # XXX: How does `rmd` work with links?
    697697        def command(self, path):
    698698            """Callback function."""
     
    817817                self._session.rename(source, target)
    818818
    819     #XXX One could argue to put this method into the `_Stat` class, but
    820     # I refrained from that because then `_Stat` would have to know
    821     # about `FTPHost`'s `_session` attribute and in turn about
     819    # XXX: One could argue to put this method into the `_Stat` class,
     820    # but I refrained from that because then `_Stat` would have to
     821    # know about `FTPHost`'s `_session` attribute and in turn about
    822822    # `_session`'s `dir` method.
    823823    def _dir(self, path):
  • ftputil/stat.py

    r1744 r1745  
    139139                                            format(mode_string))
    140140        st_mode = 0
    141         #TODO Add support for "S" and sticky bit ("t", "T").
     141        # TODO: Add support for "S" and sticky bit ("t", "T").
    142142        for bit in mode_string[1:10]:
    143143            bit = (bit != "-")
     
    274274            # supposed (rounded) and the actual time shift.
    275275            #
    276             # XXX The downside of this "correction" is that there is
     276            # XXX: The downside of this "correction" is that there is
    277277            # a one-minute time interval exactly one year ago that
    278278            # may cause that datetime to be recognized as the current
     
    633633        # Path was not found during the loop.
    634634        if _exception_for_missing_path:
    635             #TODO Use FTP `LIST` command on the file to implicitly use
    636             # the usual status code of the server for missing files
    637             # (450 vs. 550).
     635            # TODO: Use FTP `LIST` command on the file to implicitly
     636            # use the usual status code of the server for missing
     637            # files (450 vs. 550).
    638638            raise ftputil.error.PermanentError(
    639639                  "550 {}: no such file or directory".format(path))
  • ftputil/stat_cache.py

    r1730 r1745  
    9696        raise an exception.
    9797        """
    98         #XXX To be 100 % sure, this should be `host.sep`, but I don't
    99         # want to introduce a reference to the `FTPHost` object for
    100         # only that purpose.
     98        # XXX: To be 100 % sure, this should be `host.sep`, but I
     99        # don't want to introduce a reference to the `FTPHost` object
     100        # for only that purpose.
    101101        assert path.startswith("/"), ("{} must be an absolute path".
    102102                                      format(path))
     
    120120                    "entry for path {} has expired".format(path))
    121121        else:
    122             #XXX I don't know if this may raise a `CacheMissError` in
    123             # case of race conditions. I prefer robust code.
     122            # XXX: I don't know if this may raise a `CacheMissError`
     123            # in case of race conditions. I prefer robust code.
    124124            try:
    125125                return self._cache[path]
  • ftputil/sync.py

    r1727 r1745  
    8080        it's actually a file, raise a `SyncError`.
    8181        """
    82         #TODO Handle setting of target mtime according to source mtime
     82        # TODO: Handle setting of target mtime according to source mtime
    8383        # (beware of rootdir anomalies; try to handle them as well).
    8484        #print("Making", target_dir)
     
    9393
    9494    def _sync_file(self, source_file, target_file):
    95         #XXX This duplicates code from `FTPHost._copyfileobj`. Maybe
     95        # XXX: This duplicates code from `FTPHost._copyfileobj`. Maybe
    9696        # implement the upload and download methods in terms of
    9797        # `_sync_file`, or maybe not?
    98         #TODO Handle `IOError`s
    99         #TODO Handle conditional copy
    100         #TODO Handle setting of target mtime according to source mtime
     98        # TODO: Handle `IOError`s
     99        # TODO: Handle conditional copy
     100        # TODO: Handle setting of target mtime according to source mtime
    101101        # (beware of rootdir anomalies; try to handle them as well).
    102102        #print("Syncing", source_file, "->", target_file)
     
    153153        This method handles both directory trees and single files.
    154154        """
    155         #TODO Handle making of missing intermediate directories
     155        # TODO: Handle making of missing intermediate directories.
    156156        source_path = self._source.path.abspath(source_path)
    157157        target_path = self._target.path.abspath(target_path)
Note: See TracChangeset for help on using the changeset viewer.