mirror of
https://github.com/neondatabase/neon.git
synced 2026-05-21 23:20:40 +00:00
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:
committed by
GitHub
parent
68ae020b37
commit
3d869cbcde
@@ -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}/"
|
||||
|
||||
@@ -6,6 +6,5 @@ set -euox pipefail
|
||||
echo 'Reformatting Rust code'
|
||||
cargo fmt
|
||||
echo 'Reformatting Python code'
|
||||
poetry run isort test_runner scripts
|
||||
poetry run flake8 test_runner scripts
|
||||
poetry run ruff --fix test_runner scripts
|
||||
poetry run black test_runner scripts
|
||||
|
||||
@@ -68,7 +68,6 @@ def call_delete_tenant_api(tenant_id):
|
||||
|
||||
|
||||
def cleanup_tenant(tenant_id):
|
||||
|
||||
tenant_dir = Path(f"/storage/safekeeper/data/{tenant_id}")
|
||||
|
||||
if not tenant_dir.exists():
|
||||
|
||||
Reference in New Issue
Block a user