[issue44854] Add .editorconfig to the root directory

2021-08-10 Thread Łukasz Langa

Łukasz Langa  added the comment:

Thanks everybody for review! ✨ 🍰 ✨

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44854] Add .editorconfig to the root directory

2021-08-10 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset d27e2f4d118e7a9909b6a3e5da06c5ff95806a85 by Miss Islington (bot) 
in branch '3.9':
bpo-44854: Add .editorconfig file to help enforce `make patchcheck` (GH-27638) 
(GH-27714)
https://github.com/python/cpython/commit/d27e2f4d118e7a9909b6a3e5da06c5ff95806a85


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44854] Add .editorconfig to the root directory

2021-08-10 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 7f88aeadc19b1d3ece4723efb240e6d6753570b9 by Miss Islington (bot) 
in branch '3.8':
bpo-44854: Add .editorconfig file to help enforce `make patchcheck` (GH-27638) 
(GH-27713)
https://github.com/python/cpython/commit/7f88aeadc19b1d3ece4723efb240e6d6753570b9


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44854] Add .editorconfig to the root directory

2021-08-10 Thread miss-islington


miss-islington  added the comment:


New changeset a6808c6378ccfd732285ee20319658ac29eacf4c by Miss Islington (bot) 
in branch '3.10':
bpo-44854: Add .editorconfig file to help enforce `make patchcheck` (GH-27638)
https://github.com/python/cpython/commit/a6808c6378ccfd732285ee20319658ac29eacf4c


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44854] Add .editorconfig to the root directory

2021-08-10 Thread miss-islington


Change by miss-islington :


--
pull_requests: +26198
pull_request: https://github.com/python/cpython/pull/27713

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44854] Add .editorconfig to the root directory

2021-08-10 Thread miss-islington


Change by miss-islington :


--
pull_requests: +26197
pull_request: https://github.com/python/cpython/pull/27712

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44854] Add .editorconfig to the root directory

2021-08-10 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 3.0 -> 4.0
pull_requests: +26196
pull_request: https://github.com/python/cpython/pull/27714

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44854] Add .editorconfig to the root directory

2021-08-10 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset c0ab59f7de1906feee21c057ad433fad924d1e38 by Łukasz Langa in 
branch 'main':
bpo-44854: Add .editorconfig file to help enforce `make patchcheck` (GH-27638)
https://github.com/python/cpython/commit/c0ab59f7de1906feee21c057ad433fad924d1e38


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44854] Add .editorconfig to the root directory

2021-08-09 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 058fb35b57ca8c5063d16ec818e668b3babfea65 by Serhiy Storchaka in 
branch 'main':
bpo-44854: Remove trailing whitespaces (GH-27689)
https://github.com/python/cpython/commit/058fb35b57ca8c5063d16ec818e668b3babfea65


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44854] Add .editorconfig to the root directory

2021-08-09 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
nosy: +serhiy.storchaka
nosy_count: 2.0 -> 3.0
pull_requests: +26175
pull_request: https://github.com/python/cpython/pull/27689

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44854] Add .editorconfig to the root directory

2021-08-09 Thread Łukasz Langa

Łukasz Langa  added the comment:

> I did not see anything in the EditorConfig guide about what happens when 
> .editorconfig does not start with root = true and another file is found.

Good question. The docs do mention this but the information is scattered across 
the website. The key points are:

> EditorConfig files are read top to bottom and the most recent rules found 
> take precedence. Properties from matching EditorConfig sections are applied 
> in the order they were read, so properties in closer files take precedence.

> When opening a file, EditorConfig plugins look for a file named .editorconfig 
> in the directory of the opened file and in every parent directory. A search 
> for .editorconfig files will stop if the root filepath is reached or an 
> EditorConfig file with root=true is found.

In other words, unless root=True is specified, the editor will keep looking for 
.editorconfig also in parent directories as well and composing the config from 
all files it found.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44854] Add .editorconfig to the root directory

2021-08-07 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I presume 'root directory' mean the repository directory.

I would have to think about supporting this in IDLE.  It already, I believe (or 
will), enforces the two whitespace rules when saving and defaults to 4-space 
indents for first lines of statements.  Enforcing that for repository .py and 
.c files would be good, but there is currently no mechanism for per-file 
settings.

I did not see anything in the EditorConfig guide about what happens when 
.editorconfig does not start with root = true and another file is found.

--
nosy: +terry.reedy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44854] Add .editorconfig to the root directory

2021-08-06 Thread Łukasz Langa

Change by Łukasz Langa :


--
keywords: +patch
pull_requests: +26132
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/27638

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44854] Add .editorconfig to the root directory

2021-08-06 Thread Łukasz Langa

New submission from Łukasz Langa :

EditorConfig is a cross-editor configuration file that is pretty widely 
adopted: https://editorconfig.org/

Adding this to the root directory will allow editors that use the file to 
automatically format a few details which we already enforce with `make 
patchcheck`:

- always put an empty line at the end of the file;
- remove trailing whitespace;
- disallow tabs in Python (PEP 8) and C (PEP 7) files.

--
messages: 399123
nosy: lukasz.langa
priority: normal
severity: normal
status: open
title: Add .editorconfig to the root directory
type: enhancement
versions: Python 3.10, Python 3.11, Python 3.8, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com