Changeset 1741:0a9be69f9436


Ignore:
Timestamp:
Dec 28, 2018, 10:08:13 PM (7 months ago)
Author:
Stefan Schwarzer <sschwarzer@…>
Branch:
default
Message:
Suppress warning about protected access

The classes `_Node` and `LRUCache` work closely together. It's ok to
access the `_sort_key` attribute of (other) `_Node` instances.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • ftputil/lrucache.py

    r1736 r1741  
    121121            # Python versions. Uses only around 60 % of the time
    122122            # with respect to `__cmp__`.
     123            # pylint: disable=protected-access
    123124            return self._sort_key < other._sort_key
    124125
     
    189190            node.atime = time.time()
    190191            node.mtime = node.atime
     192            # pylint: disable=protected-access
    191193            node._sort_key = self._sort_key()
    192194        else:
     
    215217            # Update node object in-place.
    216218            node.atime = time.time()
     219            # pylint: disable=protected-access
    217220            node._sort_key = self._sort_key()
    218221            return node.obj
Note: See TracChangeset for help on using the changeset viewer.