Module Expr Str Import alias Import alias Import alias TryExcept body ImportFrom alias handlers ExceptHandler type NameLoad body ImportFrom alias Import alias ClassDef bases NameLoad body Pass decorator_list ClassDef bases body FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str Assign AttributeStore NameLoad attr ListLoad If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str If BoolOpAnd NameLoad CompareEq Call NameLoad NameLoad Num CompareEq Call AttributeLoad NameLoad attr Str SubscriptLoad NameLoad Index Num NameLoad body Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str TupleLoad SubscriptLoad NameLoad Index Num NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad SubscriptLoad NameLoad Index Num NameLoad orelse If BoolOpAnd CompareEq Call NameLoad NameLoad Num CompareEq Call AttributeLoad NameLoad attr Str SubscriptLoad NameLoad Index Num NameLoad CompareEq Call AttributeLoad NameLoad attr Str SubscriptLoad NameLoad Index Num NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num orelse For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str If CompareNotEq Call NameLoad NameLoad Num body Raise Call NameLoad BinOpMod Str TupleLoad NameLoad Call NameLoad NameLoad Assign TupleStore NameStore NameStore NameLoad For NameStore AttributeLoad NameLoad attr body If CompareEq NameLoad AttributeLoad NameLoad attr body Raise Call NameLoad BinOpMod Str TupleLoad NameLoad NameLoad If CompareEq NameLoad AttributeLoad NameLoad attr body Raise Call NameLoad BinOpMod Str TupleLoad NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If CompareGt Call NameLoad AttributeLoad NameLoad attr Num body Return AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr Raise Call NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str For NameStore AttributeLoad NameLoad attr body If Call AttributeLoad NameLoad attr body Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str For NameStore AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareIsNot NameLoad NameLoad body Return NameLoad Raise Call NameLoad BinOpMod Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str For NameStore AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareIsNot NameLoad NameLoad body Return NameLoad Raise Call NameLoad BinOpMod Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign TupleStore NameStore NameStore NameStore NameStore NameStore NameStore Call NameLoad NameLoad If CompareEq NameLoad Str body Return NameLoad Assign NameStore Call AttributeLoad Str attr ListLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Str NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore BinOpMod Str Call NameLoad AttributeLoad NameLoad attr For NameStore AttributeLoad NameLoad attr body AugAssignAdd NameStore BinOpAdd Call NameLoad NameLoad Str Return NameLoad decorator_list decorator_list ClassDef bases body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad If CompareIs NameLoad NameLoad body Return NameLoad Return Call AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr BinOpAdd AttributeLoad NameLoad attr Str NameLoad If CompareIs NameLoad NameLoad body Return NameLoad Assign NameStore Call AttributeLoad NameLoad attr Num Return BinOpAdd BinOpAdd AttributeLoad NameLoad attr Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr BinOpAdd AttributeLoad NameLoad attr Str NameLoad If CompareIs NameLoad NameLoad body Return NameLoad Assign NameStore Call AttributeLoad NameLoad attr Num Return BinOpAdd BinOpAdd AttributeLoad NameLoad attr Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign TupleStore NameStore NameStore NameStore NameStore NameStore NameStore Call NameLoad AttributeLoad NameLoad attr If CompareNotEq NameLoad Str body Return NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr ListLoad NameLoad NameLoad Return BoolOpOr CompareEq NameLoad NameLoad CompareEq NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list decorator_list
N/A N/A Map between source URIs and destination paths N/A os N/A os.path N/A re N/A N/A urllib.parse urlparse N/A N/A N/A ImportError N/A urlparse urlparse N/A logging MapperError N/A Exception N/A N/A N/A Mapper N/A N/A __init__ N/A N/A self mappings use_default_path N/A None False N/A N/A N/A self logger N/A N/A logging getLogger resync.mapper N/A N/A self mappings N/A N/A mappings N/A N/A N/A N/A self parse mappings use_default_path N/A __len__ N/A N/A self N/A N/A N/A Length is number of mappings N/A N/A len N/A self mappings N/A parse N/A N/A self mappings use_default_path N/A False N/A N/A Parse a list of map strings (mappings)

        Accepts two distinct formats:
        1. If there are exactly two entries then these may be the source base URI
        and the destination base path. Neither may contain an equals (=) sign.
        2. For any number of mapping stings interpret each as a mapping URI=path. 
        These are in the order they will be tried.
        
        And if use_default_path is True then a third:
        3. If there is exactly one entry and it does not contain an equals (=)
        sign then a safe local path is created based on the source base URI. In
        the case that the source base URI is a local path already then an indentity 
        mapping is used.
         N/A N/A use_default_path N/A N/A len mappings 1 N/A N/A N/A re search = N/A mappings N/A 0 None N/A N/A path N/A N/A self path_from_uri N/A mappings N/A 0 N/A N/A N/A N/A self logger warning N/A Using URI mapping: %s -> %s N/A N/A mappings N/A 0 path N/A N/A N/A N/A self mappings append N/A Map N/A mappings N/A 0 path N/A N/A N/A N/A N/A len mappings 2 N/A N/A N/A re search = N/A mappings N/A 0 None N/A N/A N/A re search = N/A mappings N/A 1 None N/A N/A N/A N/A N/A self mappings append N/A Map N/A mappings N/A 0 N/A mappings N/A 1 N/A N/A mapping mappings N/A N/A l N/A N/A mapping split = N/A N/A N/A len l 2 N/A N/A N/A MapperError N/A Bad mapping argument (%s), got %s N/A mapping N/A str l N/A N/A src_uri dst_path l N/A map N/A self mappings N/A N/A N/A src_uri N/A map src_uri N/A N/A N/A MapperError N/A Attempt to set duplicate mapping for source URI %s (with destination path %s) N/A src_uri dst_path N/A N/A dst_path N/A map dst_path N/A N/A N/A MapperError N/A Attempt to set duplicate mapping for destination path %s (with source URI %s) N/A dst_path src_uri N/A N/A N/A N/A self mappings append N/A Map src_uri dst_path N/A default_src_uri N/A N/A self N/A N/A N/A Default src_uri from mapping

        This is take just to be the src_uri of the first entry
         N/A N/A N/A len N/A self mappings 0 N/A N/A N/A N/A N/A self mappings N/A 0 src_uri N/A N/A MapperError Can't get default source URI from empty mapping N/A unsafe N/A N/A self N/A N/A N/A True is one or more mapping is unsafe

        See Map.unsafe() for logic. Provide this as a test rather than 
        building into object creation/parse because it is useful to 
        allow unsafe mappings in situations where it doesn't matter.
         N/A map N/A self mappings N/A N/A N/A N/A map unsafe N/A N/A True N/A False N/A dst_to_src N/A N/A self dst_file N/A N/A N/A Map destination path to source URI N/A map N/A self mappings N/A N/A src_uri N/A N/A map dst_to_src dst_file N/A N/A src_uri None N/A N/A src_uri N/A N/A MapperError N/A Unable to translate destination path (%s) into a source URI. dst_file N/A src_to_dst N/A N/A self src_uri N/A N/A N/A Map source URI to destination path N/A map N/A self mappings N/A N/A dst_path N/A N/A map src_to_dst src_uri N/A N/A dst_path None N/A N/A dst_path N/A N/A MapperError N/A Unable to translate source URI (%s) into a destination path. src_uri N/A path_from_uri N/A N/A self uri N/A N/A N/A Make a safe path name from uri

        In the case that uri is already a local path then the same path
        is returned.
         N/A N/A scheme netloc path params query fragment N/A urlparse uri N/A N/A netloc N/A N/A uri N/A path N/A N/A / join N/A netloc path N/A path N/A N/A re sub [^\w\-\.] _ path N/A path N/A N/A re sub __+ _ path N/A path N/A N/A re sub [_\.]+$ path N/A path N/A N/A re sub ^[_\.]+ path N/A path N/A __repr__ N/A N/A self N/A N/A N/A s N/A Mapper with %d maps:
 N/A len N/A self mappings N/A map N/A self mappings N/A N/A s N/A N/A str map N/A s N/A N/A Map N/A N/A N/A A single map from source URI to destination path

    Both URI and destination paths are assumed to use / as the path
    separator. No account is take for other path separators used
    for paths on non-unix systems. This translation must be done 
    elsewhere by consideration of os.sep.
     __init__ N/A N/A self src_uri dst_path N/A None None N/A N/A N/A self src_uri N/A N/A self strip_trailing_slashes src_uri N/A N/A self dst_path N/A N/A self strip_trailing_slashes dst_path N/A strip_trailing_slashes N/A N/A self path N/A N/A N/A Return input path minus any trailing slashes N/A m N/A N/A re match (.*)/+$ path N/A N/A m None N/A N/A path N/A N/A N/A m group 1 N/A dst_to_src N/A N/A self dst_file N/A N/A N/A Return the src URI from the dst filepath

        This does not rely on the destination filepath actually existing on the local
        filesystem, just on pattern matching. Return source URI on success, None on 
        failure.
         N/A m N/A N/A re match N/A N/A self dst_path /(.*)$ dst_file N/A N/A m None N/A N/A None N/A rel_path N/A N/A m group 1 N/A N/A N/A N/A self src_uri / rel_path N/A src_to_dst N/A N/A self src_uri N/A N/A N/A Return the dst filepath from the src URI
        
        Returns None on failure, destination path on success.
         N/A m N/A N/A re match N/A N/A self src_uri /(.*)$ src_uri N/A N/A m None N/A N/A None N/A rel_path N/A N/A m group 1 N/A N/A N/A N/A self dst_path / rel_path N/A unsafe N/A N/A self N/A N/A N/A True is the mapping is unsafe for an update

        Applies only to local source. Returns True if the paths for source and 
        destination are the same, or if one is a component of the other path.
         N/A N/A scheme netloc path params query fragment N/A urlparse N/A self src_uri N/A N/A scheme N/A N/A False N/A s N/A N/A N/A os path normpath N/A self src_uri N/A d N/A N/A N/A os path normpath N/A self dst_path N/A lcp N/A N/A N/A os path commonprefix N/A s d N/A N/A N/A s lcp N/A d lcp N/A __repr__ N/A N/A self N/A N/A N/A N/A Map( %s -> %s ) N/A N/A self src_uri N/A self dst_path N/A N/A