Skip to content

Commit 9bca5fc

Browse files
committed
fix: Linting and prepare for release.
1 parent 60e86e5 commit 9bca5fc

File tree

5 files changed

+17
-7
lines changed

5 files changed

+17
-7
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
### 0.17.0
4+
5+
- feat: Add support for Postgres sqlbody functions.
6+
37
## 0.16
48

59
### 0.16.4

pyproject.toml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "sqlalchemy-declarative-extensions"
3-
version = "0.16.4"
3+
version = "0.16.5"
44
authors = [
55
{name = "Dan Cardin", email = "ddcardin@gmail.com"},
66
]
@@ -45,9 +45,8 @@ changelog = "https://github.com/DanCardin/sqlalchemy-declarative-extensions/blob
4545
alembic = ["alembic >= 1.0"]
4646
parse = ["sqlglot"]
4747

48-
[tool.uv]
49-
environments = ["python_version < '3.9'", "python_version >= '3.9' and python_version < '4'"]
50-
dev-dependencies = [
48+
[dependency-groups]
49+
dev = [
5150
"alembic-utils >= 0.8.1",
5251
"coverage >= 5",
5352
"mypy == 1.8.0",
@@ -67,6 +66,9 @@ dev-dependencies = [
6766
"snowflake-sqlalchemy >= 1.6.0; python_version >= '3.9'",
6867
]
6968

69+
[tool.uv]
70+
environments = ["python_version < '3.9'", "python_version >= '3.9' and python_version < '4'"]
71+
7072
[tool.mypy]
7173
strict_optional = true
7274
ignore_missing_imports = true

src/sqlalchemy_declarative_extensions/dialects/postgresql/function.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@ class Function(base.Function):
6666

6767
@property
6868
def _has_sqlbody(self) -> bool:
69-
return self.language.lower() == "sql" and _sqlbody_regex.match(self.definition)
69+
return self.language.lower() == "sql" and bool(
70+
_sqlbody_regex.match(self.definition)
71+
)
7072

7173
def to_sql_create(self, replace=False) -> list[str]:
7274
components = ["CREATE"]

src/sqlalchemy_declarative_extensions/dialects/postgresql/procedure.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ class Procedure(base.Procedure):
4242

4343
@property
4444
def _has_sqlbody(self) -> bool:
45-
return self.language.lower() == "sql" and _sqlbody_regex.match(self.definition)
45+
return self.language.lower() == "sql" and bool(
46+
_sqlbody_regex.match(self.definition)
47+
)
4648

4749
def to_sql_create(self, replace=False) -> list[str]:
4850
components = ["CREATE"]

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)