Re: [sqlalchemy] flake8 tips?

2015-05-18 Thread Jonathan Vanasco
I just found a bug in my code that is related to this, and wanted to circle 
back...

I keep forgetting that these are not the same comparison on Postgres:

Foo != True 
Foo IS NOT True


They match as follows:
`!= True` = [False, ]
`IS NOT True` = [False, NULL]



-- 
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 http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.


Re: [sqlalchemy] flake8 tips?

2014-07-22 Thread Michael Bayer
There are two approaches:

1. disable E711 and E712.   this is what I'm doing for the project itself.

2. use == sqlalchemy.null(), == sqlalchemy.true(), == sqlalchemy.false() 
instead of None, True, False.   This might be a better idea for everyone else 
who cares about super-clean code.


On Jul 22, 2014, at 5:57 PM, Jonathan Vanasco  wrote:

> thanks. I already added  `# noqa` to those lines.
> 
> that pep8 test is actually bad, digging into the docs, it's actually 
> recommending the "worst case" format.  there's a bunch of debate on it in a 
> github ticket.
> 
> do you know of any other odd behaviors? 
> 
> -- 
> 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 http://groups.google.com/group/sqlalchemy.
> For more options, visit https://groups.google.com/d/optout.

-- 
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 http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.


Re: [sqlalchemy] flake8 tips?

2014-07-22 Thread Jonathan Vanasco
thanks. I already added  `# noqa` to those lines.

that pep8 test is actually bad, digging into the docs, it's actually 
recommending the "worst case" format.  there's a bunch of debate on it in a 
github ticket.

do you know of any other odd behaviors? 

-- 
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 http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.


RE: [sqlalchemy] flake8 tips?

2014-07-22 Thread Michael Nachtigal
You can try adding "# nopep8" or "# noqa" at the end of any line to suppress 
pep8/flake8 messages for that line.

There may be more in the docs about this about how to suppress which errors 
specifically:

https://pypi.python.org/pypi/flake8

--Mike

From: sqlalchemy@googlegroups.com [sqlalchemy@googlegroups.com] on behalf of 
Jonathan Vanasco [jonat...@findmeon.com]
Sent: Tuesday, July 22, 2014 5:36 PM
To: sqlalchemy@googlegroups.com
Subject: [sqlalchemy] flake8 tips?

i recently introduced flake8 testing into our automated builds. (an idea 
inspired by mike bayer)

i already ran into an issue with Flake8 generating errors for ` == True` 
comparisons ( which are required under SqlAlchemy)

does anyone have any tips/tricks/gotchas for dealing with flake8 in SqlAlchemy 
projects ?


--
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<mailto:sqlalchemy+unsubscr...@googlegroups.com>.
To post to this group, send email to 
sqlalchemy@googlegroups.com<mailto:sqlalchemy@googlegroups.com>.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

-- 
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 http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.


[sqlalchemy] flake8 tips?

2014-07-22 Thread Jonathan Vanasco
i recently introduced flake8 testing into our automated builds. (an idea 
inspired by mike bayer)

i already ran into an issue with Flake8 generating errors for ` == True` 
comparisons ( which are required under SqlAlchemy)

does anyone have any tips/tricks/gotchas for dealing with flake8 in 
SqlAlchemy projects ?

-- 
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 http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.