Bump pyupgrade target to 3.10+
... according to the versions currently supported. Change-Id: I435839b00f7e3fdfdee0874403b01f03d1b80e4c Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
This commit is contained in:
		@@ -26,4 +26,4 @@ repos:
 | 
			
		||||
    rev: v3.20.0
 | 
			
		||||
    hooks:
 | 
			
		||||
      - id: pyupgrade
 | 
			
		||||
        args: [--py3-only]
 | 
			
		||||
        args: [--py310-plus]
 | 
			
		||||
 
 | 
			
		||||
@@ -195,7 +195,7 @@ def _get_lock_path(name, lock_file_prefix, lock_path=None):
 | 
			
		||||
    name = name.replace(os.sep, '_')
 | 
			
		||||
    if lock_file_prefix:
 | 
			
		||||
        sep = '' if lock_file_prefix.endswith('-') else '-'
 | 
			
		||||
        name = '{}{}{}'.format(lock_file_prefix, sep, name)
 | 
			
		||||
        name = f'{lock_file_prefix}{sep}{name}'
 | 
			
		||||
 | 
			
		||||
    local_lock_path = lock_path or CONF.oslo_concurrency.lock_path
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -163,7 +163,7 @@ class ProcessLimits:
 | 
			
		||||
        for limit in self._LIMITS:
 | 
			
		||||
            val = getattr(self, limit)
 | 
			
		||||
            if val is not None:
 | 
			
		||||
                args.append("{}={}".format(self._LIMITS[limit], val))
 | 
			
		||||
                args.append(f"{self._LIMITS[limit]}={val}")
 | 
			
		||||
        return args
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -607,7 +607,7 @@ class FakeSshConnection:
 | 
			
		||||
 | 
			
		||||
    def exec_command(self, cmd, timeout=None):
 | 
			
		||||
        if timeout:
 | 
			
		||||
            raise socket.timeout()
 | 
			
		||||
            raise TimeoutError()
 | 
			
		||||
        stdout = FakeSshStream(self.out)
 | 
			
		||||
        stdout.setup_channel(self.rc)
 | 
			
		||||
        return (io.BytesIO(),
 | 
			
		||||
 
 | 
			
		||||
@@ -64,7 +64,7 @@ def watch(logger, action, level=logging.DEBUG, after=5.0):
 | 
			
		||||
    watch.start()
 | 
			
		||||
 | 
			
		||||
    def log():
 | 
			
		||||
        msg = "{} not completed after {:0.3f}s".format(action, watch.elapsed())
 | 
			
		||||
        msg = f"{action} not completed after {watch.elapsed():0.3f}s"
 | 
			
		||||
        logger.log(level, msg)
 | 
			
		||||
 | 
			
		||||
    timer = threading.Timer(after, log)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user