Changeset 1718:8bed138bc404


Ignore:
Timestamp:
Dec 25, 2018, 11:19:02 PM (8 months ago)
Author:
Stefan Schwarzer <sschwarzer@…>
Branch:
default
Message:
Don't inherit from `object`

This is no longer needed because we're targeting Python 3 only now.
Files:
23 edited

Legend:

Unmodified
Added
Removed
  • find_invalid_code.py

    r1565 r1718  
    11#! /usr/bin/env python
    2 # Copyright (C) 2008-2013, Stefan Schwarzer <sschwarzer@sschwarzer.net>
     2# Copyright (C) 2008-2018, Stefan Schwarzer <sschwarzer@sschwarzer.net>
    33# and ftputil contributors (see `doc/contributors.txt`)
    44# See the file LICENSE for licensing terms.
     
    1919"""
    2020
    21 from __future__ import absolute_import
    22 from __future__ import print_function
    23 from __future__ import unicode_literals
    24 
    2521import os
    2622import re
     
    3430
    3531
    36 class InvalidFeature(object):
     32class InvalidFeature:
    3733    """
    3834    Store message, regex and locations of a single now invalid
  • ftputil/error.py

    r1713 r1718  
    120120
    121121
    122 class FtplibErrorToFTPOSError(object):
     122class FtplibErrorToFTPOSError:
    123123    """
    124124    Context manager to convert `ftplib` exceptions to exceptions
     
    159159
    160160
    161 class FtplibErrorToFTPIOError(object):
     161class FtplibErrorToFTPIOError:
    162162    """
    163163    Context manager to convert `ftplib` exceptions to `FTPIOError`
  • ftputil/file.py

    r1717 r1718  
    1717
    1818
    19 class FTPFile(object):
     19class FTPFile:
    2020    """
    2121    Represents a file-like object associated with an FTP host. File
  • ftputil/file_transfer.py

    r1717 r1718  
    2222
    2323
    24 class LocalFile(object):
     24class LocalFile:
    2525    """
    2626    Represent a file on the local side which is to be transferred or
     
    5757
    5858
    59 class RemoteFile(object):
     59class RemoteFile:
    6060    """
    6161    Represent a file on the remote side which is to be transferred or
  • ftputil/host.py

    r1717 r1718  
    3434# `FTPHost` class with several methods similar to those of `os`
    3535
    36 class FTPHost(object):
     36class FTPHost:
    3737    """FTP host class."""
    3838
  • ftputil/path.py

    r1713 r1718  
    2020
    2121
    22 class _Path(object):
     22class _Path:
    2323    """
    2424    Support class resembling `os.path`, accessible from the `FTPHost`
  • ftputil/stat.py

    r1713 r1718  
    7676# FTP directory parsers
    7777#
    78 class Parser(object):
     78class Parser:
    7979    """
    8080    Represent a parser for directory lines. Parsers for specific
     
    509509# Stat'ing operations for files on an FTP server
    510510#
    511 class _Stat(object):
     511class _Stat:
    512512    """Methods for stat'ing directories, links and regular files."""
    513513
  • ftputil/stat_cache.py

    r1713 r1718  
    1717
    1818
    19 class StatCache(object):
     19class StatCache:
    2020    """
    2121    Implement an LRU (least-recently-used) cache.
  • ftputil/sync.py

    r1713 r1718  
    2828
    2929
    30 class LocalHost(object):
     30class LocalHost:
    3131    """
    3232    Provide an API for local directories and files so we can use the
     
    5454
    5555
    56 class Syncer(object):
     56class Syncer:
    5757    """
    5858    Control synchronization between combinations of local and remote
  • test/mock_ftplib.py

    r1713 r1718  
    3535
    3636
    37 class MockFile(io.BytesIO, object):
     37class MockFile(io.BytesIO):
    3838    """
    3939    Mock class for the file objects _contained in_ `FTPFile` objects
     
    6363
    6464
    65 class MockSocket(object):
     65class MockSocket:
    6666    """
    6767    Mock class which is used to return something from
     
    8989
    9090
    91 class MockSession(object):
     91class MockSession:
    9292    """
    9393    Mock class which works like `ftplib.FTP` for the purpose of the
  • test/test_error.py

    r1713 r1718  
    1111
    1212
    13 class TestFTPErrorArguments(object):
     13class TestFTPErrorArguments:
    1414    """
    1515    The `*Error` constructors should accept either a byte string or a
     
    2828
    2929
    30 class TestErrorConversion(object):
     30class TestErrorConversion:
    3131
    3232    def callee(self):
  • test/test_file.py

    r1713 r1718  
    4141
    4242
    43 class TestFileOperations(object):
     43class TestFileOperations:
    4444    """Test operations with file-like objects."""
    4545
     
    229229
    230230
    231 class TestAvailableChild(object):
     231class TestAvailableChild:
    232232
    233233    def _failing_pwd(self, exception_class):
  • test/test_file_transfer.py

    r1713 r1718  
    1313
    1414
    15 class MockFile(object):
     15class MockFile:
    1616    """Class compatible with `LocalFile` and `RemoteFile`."""
    1717
     
    2727
    2828
    29 class TestTimestampComparison(object):
     29class TestTimestampComparison:
    3030
    3131    def test_source_is_newer_than_target(self):
     
    8282
    8383
    84 class TestChunkwiseTransfer(object):
     84class TestChunkwiseTransfer:
    8585
    8686    def _random_string(self, count):
  • test/test_host.py

    r1713 r1718  
    167167# Test cases
    168168#
    169 class TestConstructor(object):
     169class TestConstructor:
    170170    """
    171171    Test initialization of `FTPHost` objects.
     
    195195
    196196
    197 class TestKeepAlive(object):
     197class TestKeepAlive:
    198198
    199199    def test_succeeding_keep_alive(self):
     
    210210
    211211
    212 class TestSetParser(object):
     212class TestSetParser:
    213213
    214214    class TrivialParser(ftputil.stat.Parser):
     
    242242
    243243
    244 class TestCommandNotImplementedError(object):
     244class TestCommandNotImplementedError:
    245245
    246246    def test_command_not_implemented_error(self):
     
    257257
    258258
    259 class TestRecursiveListingForDotAsPath(object):
     259class TestRecursiveListingForDotAsPath:
    260260    """
    261261    Return a recursive directory listing when the path to list
     
    290290
    291291
    292 class TestUploadAndDownload(object):
     292class TestUploadAndDownload:
    293293    """Test ASCII upload and binary download as examples."""
    294294
     
    391391
    392392
    393 class TestTimeShift(object):
     393class TestTimeShift:
    394394
    395395    def test_rounded_time_shift(self):
     
    485485
    486486
    487 class TestAcceptEitherUnicodeOrBytes(object):
     487class TestAcceptEitherUnicodeOrBytes:
    488488    """
    489489    Test whether certain `FTPHost` methods accept either unicode
     
    602602
    603603
    604 class TestFailingPickling(object):
     604class TestFailingPickling:
    605605
    606606    def test_failing_pickling(self):
  • test/test_path.py

    r1713 r1718  
    3232
    3333
    34 class TestPath(object):
     34class TestPath:
    3535    """Test operations in `FTPHost.path`."""
    3636
     
    124124
    125125
    126 class TestAcceptEitherBytesOrUnicode(object):
     126class TestAcceptEitherBytesOrUnicode:
    127127
    128128    def setup_method(self, method):
  • test/test_public_servers.py

    r1713 r1718  
    7373
    7474
    75 class TestPublicServers(object):
     75class TestPublicServers:
    7676    """
    7777    Get directory listings from various public FTP servers
  • test/test_real_ftp.py

    r1713 r1718  
    5656
    5757
    58 class Cleaner(object):
     58class Cleaner:
    5959    """
    6060    This class helps remove directories and files which might
     
    9898
    9999
    100 class RealFTPTest(object):
     100class RealFTPTest:
    101101
    102102    def setup_method(self, method):
  • test/test_session.py

    r1713 r1718  
    1010
    1111
    12 class MockSession(object):
     12class MockSession:
    1313    """
    1414    Mock session base class to determine if all expected calls
     
    4747
    4848
    49 class TestSessionFactory(object):
     49class TestSessionFactory:
    5050    """
    5151    Test if session factories created by
  • test/test_stat.py

    r1713 r1718  
    4545
    4646
    47 class TestParsers(object):
     47class TestParsers:
    4848
    4949    #
     
    348348
    349349
    350 class TestLstatAndStat(object):
     350class TestLstatAndStat:
    351351    """
    352352    Test `FTPHost.lstat` and `FTPHost.stat` (test currently only
     
    511511
    512512
    513 class TestListdir(object):
     513class TestListdir:
    514514    """Test `FTPHost.listdir`."""
    515515
  • test/test_stat_cache.py

    r1713 r1718  
    1313
    1414
    15 class TestStatCache(object):
     15class TestStatCache:
    1616
    1717    def setup_method(self, method):
  • test/test_sync.py

    r1713 r1718  
    1616
    1717
    18 class TestLocalToLocal(object):
     18class TestLocalToLocal:
    1919
    2020    def setup_method(self, method):
     
    7777
    7878
    79 class DummyFTPSession(object):
     79class DummyFTPSession:
    8080
    8181    def pwd(self):
     
    8383
    8484
    85 class DummyFTPPath(object):
     85class DummyFTPPath:
    8686
    8787    def abspath(self, path):
     
    113113
    114114
    115 class TestUploadFromWindows(object):
     115class TestUploadFromWindows:
    116116
    117117    def test_no_mixed_separators(self):
  • test/test_tool.py

    r1713 r1718  
    77
    88
    9 class TestSameStringTypeAs(object):
     9class TestSameStringTypeAs:
    1010
    1111    # The first check for equality is enough for Python 3, where
     
    3434
    3535
    36 class TestSimpleConversions(object):
     36class TestSimpleConversions:
    3737
    3838    def test_as_bytes(self):
     
    5353
    5454
    55 class TestEncodeIfUnicode(object):
     55class TestEncodeIfUnicode:
    5656
    5757    def test_do_encode(self):
  • test/test_with_statement.py

    r1713 r1718  
    2121# Test cases
    2222#
    23 class TestHostContextManager(object):
     23class TestHostContextManager:
    2424
    2525    def test_normal_operation(self):
     
    4848
    4949
    50 class TestFileContextManager(object):
     50class TestFileContextManager:
    5151
    5252    def test_normal_operation(self):
Note: See TracChangeset for help on using the changeset viewer.