Commit a5276f0b authored by Chosson Ulysse's avatar Chosson Ulysse
Browse files

Merge branch 'dev' into 'main'

Dev

See merge request !192
parents 528b9533 cea70e9b
Pipeline #21210 passed with stages
in 4 minutes and 49 seconds
......@@ -9,6 +9,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
## [1.4.1-pre-release] - 2022-11-22
### Fixed
- Add the TypeAlias: `PyLinqSqlInsertType` in the file `__init__.py` to import it.
- Fix requirement in `doc/requirement.txt` for psycopg (3.1.14 to 3.1.4, typo).
## [1.4.0-pre-release] - 2022-11-18
### Added
......
rich==12.6.0
py-linq==1.3.0
dotmap==1.3.30
psycopg==3.1.14
psycopg==3.1.4
toml==0.10.2
PyYAML==6.0
types-toml==0.10.8
......
......@@ -10,7 +10,7 @@ watch:
- CONTRIBUTING.md
extra:
version: 1.4.0-pre-release
version: 1.4.1-pre-release
theme:
name: readthedocs
......
This diff is collapsed.
"""Code of the project py-linq-sql."""
__version__ = "1.4.0-pre-release"
__version__ = "1.4.1-pre-release"
# Local imports
from .build_request.consult_aggregate import ( # noqa: F401, E501 pylint: disable=redefined-builtin
......@@ -47,6 +47,7 @@ from .exception.exception import ( # noqa: F401
)
from .sql_enumerable.sql_enumerable import SQLEnumerable # noqa: F401
from .utils.classes.enum import JoinType # noqa: F401
from .utils.classes.other_classes import PyLinqSqlInsertType # noqa: F401
from .utils.db import connect # noqa: F401
from .utils.execute import logg # noqa: F401
from .utils.functions.magic_dp_hyperb_functions import ( # noqa: F401
......
......@@ -125,7 +125,7 @@ def dispatch_build(
result = _dispatch_alter(command, sqle, built_commands)
case command.cmd_type if command.cmd_type in [Ct.ANY, Ct.ALL, Ct.CONTAINS]:
result = _dispatch_one(command, sqle)
case command.cmd_type if command.cmd_type in Ct: # type: ignore[operator]
case command.cmd_type if command.cmd_type in list(Ct): # type: ignore[operator]
# HACK: The ignore above it's just the time that mypy supports the Strenum.
# https://github.com/python/mypy/issues
pass
......
......@@ -115,7 +115,9 @@ def _dispatch_select(
result = build_union(command)
case CommandType.INTERSECT:
result = build_intersect(command)
case command.cmd_type if command.cmd_type in _SELECT_ADD_CMD or CommandType:
case command.cmd_type if (
command.cmd_type in _SELECT_ADD_CMD or command.cmd_type in list(CommandType)
):
pass
# The following case is just an other security layers,
# but we can't go in this case for the moment.
......
......@@ -304,7 +304,7 @@ class SQLEnumerable:
if self.flags.join:
raise GroupByWithJoinError()
self._check_legality_terminal_alter(cmd)
case cmd if cmd in Ct: # type: ignore[operator] # HACK
case cmd if cmd in list(Ct): # type: ignore[operator] # HACK
self._check_legality_terminal_alter(cmd)
# The following case is just an other security layers,
# but we can't go in this case for the moment.
......
......@@ -67,7 +67,8 @@ def join_get_paths(
result_function: Callable[
[BaseMagicDotPath, BaseMagicDotPath],
BaseMagicDotPath | Tuple[BaseMagicDotPath] | Dict[str, BaseMagicDotPath],
],
]
| None,
) -> DotMap:
"""
Get all paths for join.
......
[tool.poetry]
name = "py-linq-sql"
version = "1.4.0.1"
version = "1.4.1.1"
description = "A Python module used for interacting with sql database using LINQ syntax."
license = "EUPL v1.2"
authors = ["CHOSSON Ulysse <ulysse.chosson@obspm.fr>"]
......@@ -26,13 +26,13 @@ six = "^1.16.0"
[tool.poetry.group.dev.dependencies]
pytest = "7.0.0"
pytest-sugar = "0.9.5"
pytest = "^7.0.2"
pytest-sugar = "^0.9.6"
pytest-pudb = "^0.7.0"
assertpy = "^1.1"
pytest-postgresql = "^4.1.1"
tmp-connection-psql = "^1.1.0"
psycopg-pool = "3.1.3"
tmp-connection-psql = "^1.2.0"
psycopg-pool = "3.1.4"
mpmath = "^1.2.1"
numpy = "^1.23.4"
xdoctest = "^1.1.0"
......@@ -49,7 +49,7 @@ codespell = "^2.2.2"
dlint = "^0.13.0"
bandit = "^1.7.4"
pydocstyle = "^6.1.1"
mypy = "^0.982"
mypy = "^0.991"
sqlfluff = "^1.4.1"
pylint = "^2.15.5"
pygments = "2.12.0"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment