Enable SIM in flake8 and ruff
This commit is contained in:
parent
5dce8e6645
commit
007998372f
1 changed files with 33 additions and 36 deletions
|
|
@ -21,14 +21,11 @@ log_config.fileConfig(context.config.config_file_name)
|
|||
|
||||
def include_object(obj, _name, type_, _reflected, _compare_to):
|
||||
"""Only include the clean schema into --autogenerate migrations."""
|
||||
if (
|
||||
return not (
|
||||
type_ in {"table", "column"}
|
||||
and hasattr(obj, "schema") # => fix for rare edge case
|
||||
and obj.schema != pkg_config.CLEAN_SCHEMA
|
||||
):
|
||||
return False
|
||||
|
||||
return True
|
||||
)
|
||||
|
||||
|
||||
# Without a `pool`, the `connection` really closes after the migrations
|
||||
|
|
|
|||
Loading…
Reference in a new issue