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

Does not comply with E203 from pep8 #315

Closed
horta opened this issue Jun 7, 2018 · 3 comments
Closed

Does not comply with E203 from pep8 #315

horta opened this issue Jun 7, 2018 · 3 comments

Comments

@horta
Copy link

horta commented Jun 7, 2018

Operating system:
Python version: 3.6
Black version: 18.6b1
Does also happen on master: yes

Create a file with

tup = nsamples, nalleless[i : i + size], i, size

and black won't correct the white spaces around :.

@JelleZijlstra
Copy link
Collaborator

pep8 is wrong here. Quoting black's README: "This behaviour may raise E203 whitespace before ':' warnings in style guide enforcement tools like Flake8. Since E203 is not PEP 8 compliant, you should tell Flake8 to ignore these warnings."

In general when using black it's safe to disable formatting-related errors in tools like flake8; black takes care of the styling minutiae for you.

@horta
Copy link
Author

horta commented Jun 7, 2018

Thanks a lot, @JelleZijlstra !

@zsol zsol closed this as completed Jun 7, 2018
ggoossen added a commit to ggoossen/pytorch that referenced this issue Jan 2, 2019
Summary:
Ignore sometimes incorrect flake8 warning about whitespace before ':'

See psf/black#315

Differential Revision: D13565818

fbshipit-source-id: ce3ff158da2e4443e44f01c86dcbd889c9f5bcc1
facebook-github-bot pushed a commit to pytorch/pytorch that referenced this issue Jan 3, 2019
Summary:
Pull Request resolved: #15663

Ignore sometimes incorrect flake8 warning about whitespace before ':'

See psf/black#315

Reviewed By: soumith

Differential Revision: D13565818

fbshipit-source-id: 9d5ec2335899527ee71f4b505c00865a354e3bf0
m3nu added a commit to m3nu/invoice2data that referenced this issue Aug 21, 2019
m3nu added a commit to invoice-x/invoice2data that referenced this issue Aug 21, 2019
* Format with Black.
* Ignore E203. See psf/black#315
ramyaragupathy added a commit to hotosm/tasking-manager that referenced this issue Oct 23, 2019
ramyaragupathy added a commit to hotosm/tasking-manager that referenced this issue Oct 23, 2019
ramyaragupathy pushed a commit to hotosm/tasking-manager that referenced this issue Oct 23, 2019
Complete teams and organisations, extend campaigns from tags into own objects

Port teams, orgs and campaigns to APIv2

Cleaning up and debugging teams, orgs and campaigns backend

fix revision for merge

Handle non-null fields + Consistent table names

CI fix: Update Image ID

Black formatting

Flake updates

Flake fix

Remove the default length

Ignore E203 psf/black#315

Revert ignore flag on flake
wuxiaohua1011 added a commit to wuxiaohua1011/maggma that referenced this issue Jan 22, 2020
… be resolved. Following the suggestion on this thread:

psf/black#315
coobas pushed a commit to coobas/yoyo-migrations that referenced this issue May 9, 2020
agucova added a commit to agucova/BC_API that referenced this issue Jun 2, 2020
E203 was removed per PEP 8, and line length was changed to 88.

See psf/black#315
jonathanhaigh added a commit to jonathanhaigh/multiconfparse that referenced this issue Jun 5, 2020
jonathanhaigh added a commit to jonathanhaigh/multiconfparse that referenced this issue Jun 5, 2020
jonathanhaigh added a commit to jonathanhaigh/multiconfparse that referenced this issue Jun 5, 2020
pwnfan added a commit to pwnfan/tagmark-py that referenced this issue Jul 24, 2023
pwnfan added a commit to pwnfan/tagmark-py that referenced this issue Jul 24, 2023
pwnfan added a commit to pwnfan/tagmark-py that referenced this issue Jul 24, 2023
pwnfan added a commit to pwnfan/tagmark-py that referenced this issue Aug 3, 2023
pwnfan added a commit to pwnfan/tagmark-py that referenced this issue Aug 3, 2023
pwnfan added a commit to pwnfan/tagmark-py that referenced this issue Aug 3, 2023
pwnfan added a commit to pwnfan/tagmark-py that referenced this issue Aug 3, 2023
pwnfan added a commit to pwnfan/tagmark-py that referenced this issue Aug 3, 2023
pwnfan added a commit to pwnfan/tagmark-py that referenced this issue Aug 4, 2023
mmalina added a commit to konflux-ci/release-service-utils that referenced this issue Nov 10, 2023
Flake8 was disagreeing with a formatting change
black did. It turns out this is a known issue
and it seems the recommended solution is to ignore
this warning in flake8.

See here for more details:
psf/black#315

Signed-off-by: Martin Malina <mmalina@redhat.com>
mmalina added a commit to konflux-ci/release-service-utils that referenced this issue Nov 10, 2023
* refactor(RHTAPBUGS-919): create components in batches

By creating sbom components in Pyxis in batches
of 5, the overall script runtime is reduced by around
47 % in my testing with an sbom with 113 components.

The batch size is configurable, but currently set to 5.

* fix: flake8 and black conflict

Flake8 was disagreeing with a formatting change
black did. It turns out this is a known issue
and it seems the recommended solution is to ignore
this warning in flake8.

See here for more details:
psf/black#315

Signed-off-by: Martin Malina <mmalina@redhat.com>
TOP-10-DEV added a commit to TOP-10-DEV/localGPT that referenced this issue Dec 8, 2023
This conflicts with black. Black converts `arr[start:end]` to `arr[start : end]`. .flake8 fails because it expects that there are not spaces before `:`
Here is the source
psf/black#315
pieqq added a commit to canonical/checkbox that referenced this issue Apr 10, 2024
As explained in this issue[1], E203[2] is not PEP 8 compliant so it
should be ignored when running flake8.

Black is now being used in the codebase, and it takes care of the
formatting.

[1] psf/black#315
[2] https://www.flake8rules.com/rules/E203.html
pieqq added a commit to canonical/checkbox that referenced this issue Apr 11, 2024
As explained in this issue[1], E203[2] is not PEP 8 compliant so it
should be ignored when running flake8.

Black is now being used in the codebase, and it takes care of the
formatting.

[1] psf/black#315
[2] https://www.flake8rules.com/rules/E203.html
pieqq added a commit to canonical/checkbox that referenced this issue Apr 11, 2024
As explained in this issue[1], E203[2] is not PEP 8 compliant so it
should be ignored when running flake8.

Black is now being used in the codebase, and it takes care of the
formatting.

[1] psf/black#315
[2] https://www.flake8rules.com/rules/E203.html
pieqq added a commit to canonical/checkbox that referenced this issue Apr 11, 2024
* Set line length to 79 when calling black

black uses pyproject.toml to store its configuration. Update the
different projects in the monorepo to match line length of 79 when
calling black.

See black documentation[1] for more information.

[1]
https://black.readthedocs.io/en/stable/usage_and_configuration/the_basics.html#configuration-via-a-file

* Update contributing guide to mention black

* Add black GitHub Action

* Ignore vendorized code when running black

* Format all the codebase using black

Command used:

    black . --line-length 79 --extend-exclude "/vendor/"


* Ignore E203 (Whitespace before ':')

As explained in this issue[1], E203[2] is not PEP 8 compliant so it
should be ignored when running flake8.

Black is now being used in the codebase, and it takes care of the
formatting.

[1] psf/black#315
[2] https://www.flake8rules.com/rules/E203.html

* Ignore flake8 complaints for a few specific lines in the base provider

Although Black is configured at 79 chars line length, it keeps a few
lines to 80, 81 or 82 chars. Flake8 will complain about this, but we can
ignore these.
LiaoU3 pushed a commit to LiaoU3/checkbox that referenced this issue Apr 17, 2024
* Set line length to 79 when calling black

black uses pyproject.toml to store its configuration. Update the
different projects in the monorepo to match line length of 79 when
calling black.

See black documentation[1] for more information.

[1]
https://black.readthedocs.io/en/stable/usage_and_configuration/the_basics.html#configuration-via-a-file

* Update contributing guide to mention black

* Add black GitHub Action

* Ignore vendorized code when running black

* Format all the codebase using black

Command used:

    black . --line-length 79 --extend-exclude "/vendor/"

* Ignore E203 (Whitespace before ':')

As explained in this issue[1], E203[2] is not PEP 8 compliant so it
should be ignored when running flake8.

Black is now being used in the codebase, and it takes care of the
formatting.

[1] psf/black#315
[2] https://www.flake8rules.com/rules/E203.html

* Ignore flake8 complaints for a few specific lines in the base provider

Although Black is configured at 79 chars line length, it keeps a few
lines to 80, 81 or 82 chars. Flake8 will complain about this, but we can
ignore these.
JonasDoesThings added a commit to JonasDoesThings/mkdocs-exclude-unused-files that referenced this issue Jun 9, 2024
VeckoTheGecko added a commit to OceanParcels/Parcels that referenced this issue Jul 23, 2024
ngullotta added a commit to ngullotta/QuantiPy that referenced this issue Sep 25, 2024
bsquizz added a commit to bsquizz/tangerine-backend that referenced this issue Nov 20, 2024
bsquizz added a commit to RedHatInsights/tangerine-backend that referenced this issue Nov 21, 2024
* Add flake8 ignore for E203 (see psf/black#315)

* Use batch size when adding documents to avoid embedding API overload

* Move to python 3.12

* Use itertools.batched

* Update .python-version

* Fix SyntaxWarning

* Print batch number correctly
spicydilly added a commit to spicydilly/advent-of-code-2024 that referenced this issue Dec 3, 2024
spicydilly added a commit to spicydilly/advent-of-code-2024 that referenced this issue Dec 3, 2024
* e203 does not coply with pep8 as per psf/black#315

* add basic setup

* add 3 days of solutions

* add pre commit validation and test

* update python
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

4 participants