Skip to content

Comments

fixed ruff issues#346

Merged
dmitry-lipetsk merged 1 commit intopostgrespro:masterfrom
ProjectMutilation:fix-ruff-issues
Feb 24, 2026
Merged

fixed ruff issues#346
dmitry-lipetsk merged 1 commit intopostgrespro:masterfrom
ProjectMutilation:fix-ruff-issues

Conversation

@ProjectMutilation
Copy link
Contributor

No description provided.

@ProjectMutilation ProjectMutilation marked this pull request as draft February 24, 2026 11:06
@ProjectMutilation ProjectMutilation marked this pull request as ready for review February 24, 2026 12:21
Signed-off-by: Maksim Korotkov <m.korotkov@postgrespro.ru>

if __class__.sm_single_instance is not None:
assert type(__class__.sm_single_instance) == __class__ # noqa: E721
assert isinstance(__class__.sm_single_instance, __class__)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Зачем ты мне сюда isinstance притащил? )

__class__.sm_single_instance = __class__()
assert __class__.sm_single_instance is not None
assert type(__class__.sm_single_instance) == __class__ # noqa: E721
assert isinstance(__class__.sm_single_instance, __class__)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

я вообще сторонник строгих проверок, если условия не требуют обратного )

src/backup.py Outdated

assert node is not None
assert type(node) == self.original_node.__class__ # noqa: E721
assert isinstance(node, self.original_node.__class__)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isinstance

src/backup.py Outdated

assert node is not None
assert type(node) == self.original_node.__class__ # noqa: E721
assert isinstance(node, self.original_node.__class__)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
assert isinstance(node, self.original_node.__class__)
assert type(node) is self.original_node.__class__

@dmitry-lipetsk dmitry-lipetsk merged commit c73e5f6 into postgrespro:master Feb 24, 2026
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants