Re: [sqlalchemy] Re: SQLACODEGEN + VSCODE + Intellisense not working.

2018-05-13 Thread Mike Bayer
On Sun, May 13, 2018 at 6:38 AM, Jeremy Flowers
 wrote:
> I added PEP0526 code hint and that fixed it.
>
>jobrow =
> session.query(Jobmst).filter(Jobmst.jobmst_id==job['jobmst_id']).first() #
> type: Jobmst
>
>
> Is it feasible for the SQLAlchemy tool to correctly add these a the library
> level?
> It would be preferable to my client code!

if you mean SQLAlchemy would have type hinting internally, while that
might be something we do at some point I don't see how it helps the
issue of knowing what Query.first() returns, because that type is not
static. At the source code level, Query.first() returns a subclass
of "object".



>
> --
> SQLAlchemy -
> The Python SQL Toolkit and Object Relational Mapper
>
> http://www.sqlalchemy.org/
>
> To post example code, please provide an MCVE: Minimal, Complete, and
> Verifiable Example. See http://stackoverflow.com/help/mcve for a full
> description.
> ---
> You received this message because you are subscribed to the Google Groups
> "sqlalchemy" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sqlalchemy+unsubscr...@googlegroups.com.
> To post to this group, send email to sqlalchemy@googlegroups.com.
> Visit this group at https://groups.google.com/group/sqlalchemy.
> For more options, visit https://groups.google.com/d/optout.

-- 
SQLAlchemy - 
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See  http://stackoverflow.com/help/mcve for a full description.
--- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.


[sqlalchemy] Re: SQLACODEGEN + VSCODE + Intellisense not working.

2018-05-13 Thread Jeremy Flowers
I added PEP0526 code hint  and 
that fixed it.

   jobrow = 
session.query(Jobmst).filter(Jobmst.jobmst_id==job['jobmst_id']).first() # 
type: Jobmst


Is it feasible for the SQLAlchemy tool to correctly add these a the library 
level?
It would be preferable to my client code!

-- 
SQLAlchemy - 
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See  http://stackoverflow.com/help/mcve for a full description.
--- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.


[sqlalchemy] Re: SQLACODEGEN + VSCODE + Intellisense not working.

2018-05-13 Thread Jeremy Flowers

>
> I'd say specifically for this part:
>
 

  jobrow = session.query(Jobmst).filter(Jobmst.jobmst_id==job['jobmst_id']).
first()

That first method at the end... 

-- 
SQLAlchemy - 
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See  http://stackoverflow.com/help/mcve for a full description.
--- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.


[sqlalchemy] Re: SQLACODEGEN + VSCODE + Intellisense not working.

2018-05-13 Thread Jeremy Flowers

I got some feedback on Stack Overflow that sounds promising..
Does SQLAlchemy by any chance use Doctstrings to indicated return types?
Seems PyCharm Python IDE may have a work around for this?
See:
https://stackoverflow.com/questions/24684954/pycharm-type-hinting-of-class-fields-instance-variables
https://www.jetbrains.com/help/pycharm/using-docstrings-to-specify-types.html#d243105e184

-- 
SQLAlchemy - 
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See  http://stackoverflow.com/help/mcve for a full description.
--- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.


[sqlalchemy] Re: SQLACODEGEN + VSCODE + Intellisense not working.

2018-05-13 Thread Jeremy Flowers
I got some feedback on Stack Overflow that sounds promising..
Does SQLAlchemy by any chance use Doctstrings to indicated return types?
Seems PyCharm Python IDE may have a work around for this?
See:
https://stackoverflow.com/questions/24684954/pycharm-type-hinting-of-class-fields-instance-variables
https://stackoverflow.com/questions/24684954/pycharm-type-hinting-of-class-fields-instance-variables

-- 
SQLAlchemy - 
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See  http://stackoverflow.com/help/mcve for a full description.
--- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.


[sqlalchemy] Re: SQLACODEGEN + VSCODE + Intellisense not working.

2018-05-12 Thread Jeremy Flowers
Have posted on Stack Overflow here 


-- 
SQLAlchemy - 
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See  http://stackoverflow.com/help/mcve for a full description.
--- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.


[sqlalchemy] Re: SQLACODEGEN + VSCODE + Intellisense not working.

2018-05-12 Thread Jeremy Flowers
Have recorded a video 

 
showcasing issue.

-- 
SQLAlchemy - 
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See  http://stackoverflow.com/help/mcve for a full description.
--- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.


[sqlalchemy] Re: SQLACODEGEN + VSCODE + Intellisense not working.

2018-05-11 Thread Jeremy Flowers


Also tried this in extrapaths - no joy either: 

${workspaceRoot}
Per this thread  



On Saturday, 12 May 2018 00:32:40 UTC+1, Jeremy Flowers wrote:
>
> I've also been looking at here 
>  in the 
> hope of finding a solution.
> I tried setting this in the VS Code (Version 1.23.1) 'User Settings' tab 
> (File -> Preferences -> Settings) 
> "python.autoComplete.extraPaths": ["c:\\opt\\tidalconversion\tidal.py"]
>
> The exiting and relaunching IDE. Alas that didn't work either..
>

-- 
SQLAlchemy - 
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See  http://stackoverflow.com/help/mcve for a full description.
--- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.


[sqlalchemy] Re: SQLACODEGEN + VSCODE + Intellisense not working.

2018-05-11 Thread Jeremy Flowers
I've also been looking at here 
 in the hope 
of finding a solution.
I tried setting this in the VS Code (Version 1.23.1) 'User Settings' tab 
(File -> Preferences -> Settings) 
"python.autoComplete.extraPaths": ["c:\\opt\\tidalconversion\tidal.py"]

The exiting and relaunching IDE. Alas that didn't work either..

-- 
SQLAlchemy - 
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See  http://stackoverflow.com/help/mcve for a full description.
--- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.