graphite-project / carbon

Consider using f-strings PYL-C0209
Performance
Minor
3 occurrences in this check
Formatting a regular string which could be a f-string
147    typeTag = ''
148
149  timestamp = time.strftime("%d/%m/%Y %H:%M:%S")
150  return "%s :: %s%s" % (timestamp, typeTag, message)151
152
153logToDir = carbonLogObserver.log_to_dir
Formatting a regular string which could be a f-string
142  message = textFromEventDict(event)
143
144  if includeType:
145    typeTag = '[%s] ' % event.get('type', 'console')146  else:
147    typeTag = ''
148
Formatting a regular string which could be a f-string
 21    """
 22    openMode = self.defaultMode or 0o777
 23    # Fix >= Python3.8 raises RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode  # NOQA
 24    python_version = '%s.%s.%s' % (str(version_info[0]), str(version_info[1]), str(version_info[2])) 25    use_buffering = 0
 26    if python_version < '3.8.0':
 27      use_buffering = 1