@@ -433,7 +433,7 @@ def _get_validators(self, table: sa.Table, c: sa.Column[object]) -> list[Functio
433
433
continue
434
434
435
435
if isinstance (constr .sqltext , sa .BooleanClauseList ):
436
- if constr .sqltext .operator is not operator .and_ : # type: ignore[comparison-overlap]
436
+ if constr .sqltext .operator is not operator .and_ :
437
437
continue
438
438
exprs = constr .sqltext .clauses
439
439
else :
@@ -447,23 +447,23 @@ def _get_validators(self, table: sa.Table, c: sa.Column[object]) -> list[Functio
447
447
if left .expression is c :
448
448
if not isinstance (right , sa .BindParameter ) or right .value is None :
449
449
continue
450
- if op is operator .ge : # type: ignore[comparison-overlap]
450
+ if op is operator .ge :
451
451
validators .append (func ("minValue" , (right .value ,)))
452
- elif op is operator .gt : # type: ignore[comparison-overlap]
452
+ elif op is operator .gt :
453
453
validators .append (func ("minValue" , (right .value + 1 ,)))
454
- elif op is operator .le : # type: ignore[comparison-overlap]
454
+ elif op is operator .le :
455
455
validators .append (func ("maxValue" , (right .value ,)))
456
- elif op is operator .lt : # type: ignore[comparison-overlap]
456
+ elif op is operator .lt :
457
457
validators .append (func ("maxValue" , (right .value - 1 ,)))
458
458
elif isinstance (left , sa .Function ):
459
459
if left .name == "char_length" :
460
460
if next (iter (left .clauses )) is not c :
461
461
continue
462
462
if not isinstance (right , sa .BindParameter ) or right .value is None :
463
463
continue
464
- if op is operator .ge : # type: ignore[comparison-overlap]
464
+ if op is operator .ge :
465
465
validators .append (func ("minLength" , (right .value ,)))
466
- elif op is operator .gt : # type: ignore[comparison-overlap]
466
+ elif op is operator .gt :
467
467
validators .append (func ("minLength" , (right .value + 1 ,)))
468
468
elif isinstance (expr , sa .Function ):
469
469
if expr .name in ("regexp" , "regexp_like" ):
0 commit comments