Replace flake8 and isort with ruff (#3810)

- Introduce ruff (https://beta.ruff.rs/) to replace flake8 and isort
- Update mypy and black
This commit is contained in:
Alexander Bayandin
2023-03-14 14:25:44 +01:00
committed by GitHub
parent 68ae020b37
commit 3d869cbcde
39 changed files with 177 additions and 249 deletions

View File

@@ -308,8 +308,8 @@ def lsn_to_hex(num: int) -> str:
def lsn_from_hex(lsn_hex: str) -> int:
"""Convert lsn from hex notation to int."""
l, r = lsn_hex.split("/")
return (int(l, 16) << 32) + int(r, 16)
left, right = lsn_hex.split("/")
return (int(left, 16) << 32) + int(right, 16)
def remote_consistent_lsn(
@@ -398,7 +398,6 @@ def reconstruct_paths(log_dir, pg_bin, base_tar, port: int):
result = vanilla_pg.safe_psql(query, user="cloud_admin", dbname=database)
for relname, filepath in result:
if filepath is not None:
if database == "template0copy":
# Add all template0copy paths to template0
prefix = f"base/{oid}/"