

def file_pattern(name):
    if name == 'all':
        return '.*.csv'
    return name + '.*.csv'



def file_pattern(name):
    """
    Given a database name this will produce a pattern for pgloader to match
    files from that database. If the name is 'all' then a pattern that matches
    all files will be created. The file pattern is quoted using '#'.
    """

    pattern = name
    if name == 'all':
        pattern = '.'
    return '~#{pattern}*.csv#'.format(pattern=pattern)

Make file pattern quote the name
Make file pattern quote the name

Might not be the right place for it, but this does need to be done.

  
  
  def file_pattern(name):
+     """
+     Given a database name this will produce a pattern for pgloader to match
+     files from that database. If the name is 'all' then a pattern that matches
+     all files will be created. The file pattern is quoted using '#'.
+     """
+ 
+     pattern = name
      if name == 'all':
-         return '.*.csv'
-     return name + '.*.csv'
+         pattern = '.'
+     return '~#{pattern}*.csv#'.format(pattern=pattern)
  
Make file pattern quote the name
## Code Before:


def file_pattern(name):
    if name == 'all':
        return '.*.csv'
    return name + '.*.csv'

## Instruction:
Make file pattern quote the name
## Code After:


def file_pattern(name):
    """
    Given a database name this will produce a pattern for pgloader to match
    files from that database. If the name is 'all' then a pattern that matches
    all files will be created. The file pattern is quoted using '#'.
    """

    pattern = name
    if name == 'all':
        pattern = '.'
    return '~#{pattern}*.csv#'.format(pattern=pattern)
