← Back to team overview

launchpad-reviewers team mailing list archive

Re: [Merge] ~jugmac00/launchpad:run-mypy-via-tox into launchpad:master

 


Diff comments:

> diff --git a/lib/lp/services/database/sqlobject/__init__.py b/lib/lp/services/database/sqlobject/__init__.py
> index e1fcf9d..4013d35 100644
> --- a/lib/lp/services/database/sqlobject/__init__.py
> +++ b/lib/lp/services/database/sqlobject/__init__.py
> @@ -7,7 +7,31 @@
>  import datetime
>  
>  from storm.expr import SQL
> -from storm.sqlobject import *  # noqa: F401,F403
> +from storm.sqlobject import (  # noqa: F401
> +    AND,
> +    CONTAINSSTRING,
> +    DESC,
> +    IN,
> +    LIKE,
> +    NOT,
> +    OR,
> +    BoolCol,
> +    DateCol,
> +    FloatCol,
> +    ForeignKey,
> +    IntCol,
> +    IntervalCol,
> +    SingleJoin,
> +    SQLConstant,
> +    SQLMultipleJoin,
> +    SQLObjectBase,
> +    SQLObjectMoreThanOneResultError,
> +    SQLObjectNotFound,
> +    SQLObjectResultSet,
> +    SQLRelatedJoin,
> +    StringCol,
> +    UtcDateTimeCol,
> +)

This change was necessary to make mypy pass for `lp.answers`, as before that, mypy could not find the `OR` import as `import *` was used.

>  
>  _sqlStringReplace = [
>      ("\\", "\\\\"),


-- 
https://code.launchpad.net/~jugmac00/launchpad/+git/launchpad/+merge/427961
Your team Launchpad code reviewers is requested to review the proposed merge of ~jugmac00/launchpad:run-mypy-via-tox into launchpad:master.



References