Changeset 7865


Ignore:
Timestamp:
Jun 21, 2010, 11:26:20 AM (10 years ago)
Author:
hudson
Message:

Refactoring to clean up pylint errors.

Location:
trunk/anuga_core/source/anuga
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/anuga_core/source/anuga/anuga_exceptions.py

    r7743 r7865  
    44import exceptions
    55
    6 class TitleError(exceptions.IOError): pass
    7 class ParsingError(exceptions.IOError): pass
    8 class ShapeError(exceptions.IOError): pass
     6class TitleError(exceptions.IOError):
     7    """ Incorrect header in a file. """
     8    pass
     9
     10class ParsingError(exceptions.IOError):
     11    """ Could not parse a file. """
     12    pass
     13   
     14class ShapeError(exceptions.IOError):
     15    """ Pathological shape in data. """
     16    pass
    917
    1018class ANUGAError(Exception):
     19    """ Generic ANUGA error. """
    1120    def __init__(self, args=None):
    1221        self.args = args
    1322
    14 class DataMissingValuesError(exceptions.Exception): pass
    15 class DataFileNotOpenError(exceptions.Exception): pass
    16 class DataTimeError(exceptions.Exception): pass
    17 class DataDomainError(exceptions.Exception): pass
    18 class NewQuantity(exceptions.Exception): pass
    19 class TitleValueError(exceptions.Exception): pass
     23class DataMissingValuesError(exceptions.Exception):
     24    """ Missing values in file. """
     25    pass
     26   
     27class DataFileNotOpenError(exceptions.Exception):
     28    """ File is not open. """
     29    pass
     30   
     31class DataTimeError(exceptions.Exception):
     32    """ Pathological time data. """
     33    pass
     34   
     35class DataDomainError(exceptions.Exception):
     36    """ Pathological domain. """
     37    pass
     38   
     39class NewQuantity(exceptions.Exception):
     40    """ Quantity used but not defined. """
     41    pass
     42   
     43class TitleValueError(exceptions.Exception):
     44    """ Title of data column in file has wrong value. """
     45    pass
  • trunk/anuga_core/source/anuga/build_options.py

    r3875 r7865  
    1 # Build configuration for ANUGA
     1""" Build configuration for ANUGA. """
    22
    33# Flags to pass to GCC
  • trunk/anuga_core/source/anuga/compile_all.py

    r7765 r7865  
     1""" Script to compile all C extensions in ANUGA. """
     2
    13import os
    24
    3 buildroot = os.getcwd()
     5BUILDROOT = os.getcwd()
    46
    57#Attempt to compile all extensions
     
    3234execfile('..' + os.sep + 'utilities' + os.sep + 'compile.py')
    3335
    34 os.chdir(buildroot)   
     36os.chdir(BUILDROOT)   
    3537#execfile('test_all.py')
    3638   
  • trunk/anuga_core/source/anuga/config.py

    r7841 r7865  
    4343#g = 9.80665    # Gravity - FIXME reinstate this and fix unit tests.
    4444g = 9.8
    45 #g(phi) = 9780313 * (1 + 0.0053024 sin(phi)**2 - 0.000 0059 sin(2*phi)**2) micro m/s**2, where phi is the latitude
     45#g(phi) = 9780313 * (1 + 0.0053024 sin(phi)**2 - 0.000 0059 sin(2*phi)**2)
     46# micro m/s**2, where phi is the latitude
    4647#The 'official' average is 9.80665
    4748
     
    138139#
    139140# The actual soundspeed can be as high as 1530m/s
    140 # (see http://staff.washington.edu/aganse/public.projects/clustering/clustering.html),
     141# (see http://staff.washington.edu/aganse/public.projects/
     142#            clustering/clustering.html),
    141143# but that would only happen with h>225000m in this equation. Why ?
    142144# The maximal speed we specify is really related to the max speed
  • trunk/anuga_core/source/anuga/count_lines.py

    r4070 r7865  
    44import os
    55
    6 s = 'find . -type f -name "*.py" -print | xargs wc -l'
    7 print s
    8 os.system(s)
     6cmd_string = 'find . -type f -name "*.py" -print | xargs wc -l'
     7print cmd_string
     8os.system(cmd_string)
    99
    1010
    11 s = 'find . -type f -name "*.c" -print | xargs wc -l'
    12 print s
    13 os.system(s)
     11cmd_string = 'find . -type f -name "*.c" -print | xargs wc -l'
     12print cmd_string
     13os.system(cmd_string)
    1414
    1515
  • trunk/anuga_core/source/anuga/setup.py

    r1957 r7865  
     1""" Dummy file - setup would be a script to install ANUGA. """
    12pass
  • trunk/anuga_core/source/anuga/test_all.py

    r7779 r7865  
    2323
    2424# Directories that should not be searched for test files.
    25 exclude_dirs = ['pypar_dist',  'shallow_water_balanced',   # Special requirements
     25exclude_dirs = ['pypar_dist',  'shallow_water_balanced',  # Special requirements
    2626                '.svn',          # subversion
    2727                'props', 'wcprops', 'prop-base', 'text-base', 'tmp']
     
    6868
    6969
    70 ##
    71 # @brief Get 'test_*.py' files and paths to directories.
    72 # @param path Path to directory to start walk in.
    73 # @return A tuple (<files>, <dirs>).
    74 # @note Don't include any files in and below forbidden directories.
    7570def get_test_files(path):
     71    """ Get 'test_*.py' files and paths to directories.
     72    param path Path to directory to start walk in.
     73    @return A tuple (<files>, <dirs>).
     74    Don't include any files in and below forbidden directories.
     75
     76    """
    7677    walk = os.walk(path)
    7778
Note: See TracChangeset for help on using the changeset viewer.