Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

False positives on integer division #16

Closed
hvelarde opened this issue May 16, 2017 · 5 comments
Closed

False positives on integer division #16

hvelarde opened this issue May 16, 2017 · 5 comments

Comments

@hvelarde
Copy link

the following code is causing the linter to fail:

r = i % 4 * 64
g = i % 8 * 32
b = i % 16 * 16

see:

hvelarde added a commit to collective/collective.cover that referenced this issue May 16, 2017
@gforcada
Copy link
Owner

It should check for the right hand operator to not be a number... patches welcome 👍 I don't have much time lately. 😞

@hvelarde
Copy link
Author

is not that easy: the right hand operator could be also a variable; problem started with your latest release and this commit is my main suspect: 7e15700

hvelarde pushed a commit to collective/collective.cover that referenced this issue May 17, 2017
#711)

* Review contentchooser events to happen just at compose tab

* Add upgrade step

* Fix changelog

* Do not fail on S001 false positives

Refs. gforcada/flake8-pep3101#16

* Revert "Using sudo: required in .travis.yml (#705)"

This reverts commit 7d96875.
hvelarde added a commit to collective/sc.social.like that referenced this issue Jul 21, 2017
hvelarde added a commit to collective/sc.social.like that referenced this issue Jul 24, 2017
* Fix Canonical URL updater form

A new upgrade step is also provided to update the objects_provides catalog index.

* Skip S001 caused by bug in code analysis

We need to find out where to open an issue about this.

* Run tests only if Dexterity-based content types are installed

* Fix test

* Skip tests related with #119

* Document issue with code analysis

Refs. gforcada/flake8-pep3101#16

* Disable catalog queue on tests

See: https://community.plone.org/t/strange-catalog-behavior-on-plone-5-1/4582/3?u=hvelarde
hvelarde added a commit to collective/sc.social.like that referenced this issue Sep 12, 2017
hvelarde pushed a commit to collective/sc.social.like that referenced this issue Sep 15, 2017
)

* #128 - Implemented validation of the content to be shared

* #128 - refactor and check if sc.social.like is intaled

* #128 - added info in method

* #128 - pep8

* #128 - fix test image size

* #128 - started tests for new subscriber

* #128 - altered imports

* #128 - add tests subscribers

* #128 -  remove subscribers for archetypes-based content types

* #128 - pep8

* #128 - corrections

* #128 - Dexterity-based content types only

* #128 - fixed test

* #128 - altered

* #128 - add extras require

* #128 - testing request with zope.globalrequest

* Work around code analysis bug

refs. gforcada/flake8-pep3101#16

* Refactor

* Add upgrade step to enable best practices validation

* Update package documentation
claytonc added a commit to collective/sc.social.like that referenced this issue Sep 27, 2017
)

* #128 - Implemented validation of the content to be shared

* #128 - refactor and check if sc.social.like is intaled

* #128 - added info in method

* #128 - pep8

* #128 - fix test image size

* #128 - started tests for new subscriber

* #128 - altered imports

* #128 - add tests subscribers

* #128 -  remove subscribers for archetypes-based content types

* #128 - pep8

* #128 - corrections

* #128 - Dexterity-based content types only

* #128 - fixed test

* #128 - altered

* #128 - add extras require

* #128 - testing request with zope.globalrequest

* Work around code analysis bug

refs. gforcada/flake8-pep3101#16

* Refactor

* Add upgrade step to enable best practices validation

* Update package documentation
@sobolevn
Copy link

This function is also false positive:

def all_even_numbers():
    return (i for i in range(100) if i % 2 == 0)

raydavis added a commit to raydavis/boac that referenced this issue Dec 6, 2017
I'd rather be able to use the mod operator than be protected against before-my-time string formatting syntax.
gforcada/flake8-pep3101#16
@gforcada
Copy link
Owner

These should be fixed on #22 and released in 1.2, if you all could give it a try that would be awesome!

Thanks for using this flake8 plugin and taking the time to report! 🙇

@hvelarde
Copy link
Author

@gforcada it's working, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants