Do the two (long representation) of formats target the same file?
480112
def identical_format_path(fmt1, fmt2):
    """"""
    for key in ['extension', 'prefix', 'suffix']:
        if fmt1.get(key) != fmt2.get(key):
            return False
    return True
276178
function readSupportedFormatsFromINI( $iniFile = false )
    {
        if ( !$iniFile )
            $iniFile = 'image.ini';
        $ini = eZINI::instance( $iniFile );
        if ( !$ini )
            return false;
        $allowedOutputFormats = $ini->variable( 'OutputSettings', 'AllowedOutputFormat' );
        foreach ( $allowedOutputFormats as $allowedOutputFormat )
        {
            $this->appendSupportedFormat( $allowedOutputFormat );
        }
    }
17703
private boolean isMatchingFileExtension() {
    String[] fileExtensions = mediaArgs.getFileExtensions();
    if (fileExtensions == null || fileExtensions.length == 0) {
      return true;
    }
    for (String fileExtension : fileExtensions) {
      if (StringUtils.equalsIgnoreCase(fileExtension, getFileExtension())) {
        return true;
      }
    }
    return false;
  }
839089
def _formatFilepaths(self):
        
        likedir=self['output']['likedir']
        self.likefile  = join(likedir,self['output']['likefile'])
        self.mergefile = join(likedir,self['output']['mergefile'])
        self.roifile   = join(likedir,self['output']['roifile'])

        searchdir=self['output']['searchdir']
        self.labelfile  = join(searchdir,self['output']['labelfile'])
        self.objectfile = join(searchdir,self['output']['objectfile'])
        self.assocfile  = join(searchdir,self['output']['assocfile'])
        self.candfile   = join(searchdir,self['output']['candfile'])

        mcmcdir=self['output']['mcmcdir']
        self.mcmcfile   = join(mcmcdir,self['output']['mcmcfile'])
101102
def do_filesizeformat(value, binary=False):
    
    bytes = float(value)
    base = binary and 1024 or 1000
    prefixes = [
        (binary and 'KiB' or 'kB'),
        (binary and 'MiB' or 'MB'),
        (binary and 'GiB' or 'GB'),
        (binary and 'TiB' or 'TB'),
        (binary and 'PiB' or 'PB'),
        (binary and 'EiB' or 'EB'),
        (binary and 'ZiB' or 'ZB'),
        (binary and 'YiB' or 'YB')
    ]
    if bytes == 1:
        return '1 Byte'
    elif bytes < base:
        return '%d Bytes' % bytes
    else:
        for i, prefix in enumerate(prefixes):
            unit = base ** (i + 2)
            if bytes < unit:
                return '%.1f %s' % ((base * bytes / unit), prefix)
        return '%.1f %s' % ((base * bytes / unit), prefix)
1067689
def write_implied_format(self, path, jpeg_quality=0, jpeg_progressive=0):
        
        filename = fspath(path)
        with _LeptonicaErrorTrap():
            lept.pixWriteImpliedFormat(
                os.fsencode(filename), self._cdata, jpeg_quality, jpeg_progressive
            )
1200557
function normalizeFormat(format) {
  const clone = Object.assign({}, format);
  clone.prefix = normalizePrefixSuffix(format.prefix);
  clone.suffix = normalizePrefixSuffix(format.suffix);
  return clone;
}
55144
def determine_file_extension_based_on_format(format_specifier):
	
	if format_specifier == FMT_INI:
		return 'ini'
	if format_specifier == FMT_DELIMITED:
		return ''
	if format_specifier == FMT_XML:
		return 'xml'
	if format_specifier == FMT_JSON:
		return 'json'
	if format_specifier == FMT_YAML:
		return 'yml'
	raise ValueError('invalid format specifier: {}'.format(format_specifier))
414568
def format_from_extension(self, extension):
        """"""
        formats = [name
                   for name, format in self._formats.items()
                   if format.get('file_extension', None) == extension]
        if len(formats) == 0:
            return None
        elif len(formats) == 2:
            raise RuntimeError("Several extensions are registered with "
                               "that extension; please specify the format "
                               "explicitly.")
        else:
            return formats[0]
143937
def infer_format(filename:str) -> str:
    """"""
    _, ext = os.path.splitext(filename)
    return ext
189171
def normalizeFileFormatVersion(value):
    
    if not isinstance(value, int):
        raise TypeError("File format versions must be instances of "
                        ":ref:`type-int`, not %s."
                        % type(value).__name__)
    return value
1144621
def long_description():
    
    base_path = os.path.dirname(os.path.realpath(__file__))
    with io.open(os.path.join(base_path, 'README.md'), encoding='utf-8') as f:
        return f.read()
702995
def get_long_description():
    
    with codecs.open(os.path.join(here, "README.rst"), "r", "utf-8") as f:
        return f.read()
825652
def filters_out_format(self, value):
        

        if value is not None:
            assert type(value) is unicode, "'{0}' attribute: '{1}' type is not 'unicode'!".format(
                "filters_out_format", value)
            assert os.path.exists(value), "'{0}' attribute: '{1}' file doesn't exists!".format(
                "filters_out_format", value)
        self.__filters_out_format = value
834812
function noformat(app, file, locals, argv) {
  return app.isTrue('noformat') || app.isFalse('format')
    || file.noformat === true || file.format === false
    || locals.noformat === true || locals.format === false
    || argv.noformat === true || argv.format === false;
}
562640
def htmlSaveFileFormat(self, filename, encoding, format):
        
        ret = libxml2mod.htmlSaveFileFormat(filename, self._o, encoding, format)
        return ret
1125492
private long fileAligned(long value) {
        long fileAlign = optHeader.getAdjustedFileAlignment();
        long rest = value % fileAlign;
        long result = value;
        if (rest != 0) {
            result = value - rest + fileAlign;
        }
        if (!(optHeader.isLowAlignmentMode() || result % 512 == 0)) {
            logger.error("file aligning went wrong");
            logger.error("rest: " + rest);
            logger.error("value: " + value);
            logger.error("filealign: " + fileAlign);
            logger.error("filealign % 512: " + (fileAlign % 512));
            logger.error("result % 512: " + (result % 512));
            logger.error("result: " + result);
        }
        assert optHeader.isLowAlignmentMode() || result % 512 == 0;
        assert result >= value;
        return result;
    }