[v3,1/2] doc: increase python max line length to 100

Message ID 20230928121830.62608-1-juraj.linkes@pantheon.tech (mailing list archive)
State Superseded, archived
Delegated to: David Marchand
Headers
Series [v3,1/2] doc: increase python max line length to 100 |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Juraj Linkeš Sept. 28, 2023, 12:18 p.m. UTC
  Unify with C recommendations which allow line length of up to 100
characters.

Signed-off-by: Owen Hilyard <ohilyard@iol.unh.edu>
Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
---
 .editorconfig                            | 2 +-
 doc/doc_build/meson-private/meson.lock   | 0
 doc/guides/contributing/coding_style.rst | 3 +++
 dts/pyproject.toml                       | 4 ++--
 4 files changed, 6 insertions(+), 3 deletions(-)
 create mode 100644 doc/doc_build/meson-private/meson.lock
  

Comments

Paul Szczepanek Oct. 12, 2023, 12:52 p.m. UTC | #1
On 28/09/2023 13:18, Juraj Linkeš wrote:
> Unify with C recommendations which allow line length of up to 100
> characters.
>
> Signed-off-by: Owen Hilyard <ohilyard@iol.unh.edu>
> Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
> ---
>   .editorconfig                            | 2 +-
>   doc/doc_build/meson-private/meson.lock   | 0
>   doc/guides/contributing/coding_style.rst | 3 +++
>   dts/pyproject.toml                       | 4 ++--
>   4 files changed, 6 insertions(+), 3 deletions(-)
>   create mode 100644 doc/doc_build/meson-private/meson.lock
>
> diff --git a/.editorconfig b/.editorconfig
> index ab41c95085..1e7d74213f 100644
> --- a/.editorconfig
> +++ b/.editorconfig
> @@ -16,7 +16,7 @@ max_line_length = 100
>   [*.py]
>   indent_style = space
>   indent_size = 4
> -max_line_length = 79
> +max_line_length = 100
>   
>   [meson.build]
>   indent_style = space
> diff --git a/doc/doc_build/meson-private/meson.lock b/doc/doc_build/meson-private/meson.lock
> new file mode 100644
> index 0000000000..e69de29bb2
> diff --git a/doc/guides/contributing/coding_style.rst b/doc/guides/contributing/coding_style.rst
> index 648849899d..a42cd3d58d 100644
> --- a/doc/guides/contributing/coding_style.rst
> +++ b/doc/guides/contributing/coding_style.rst
> @@ -880,6 +880,9 @@ All Python code should be compliant with
>   `PEP8 (Style Guide for Python Code) <https://www.python.org/dev/peps/pep-0008/>`_.
>   
>   The ``pep8`` tool can be used for testing compliance with the guidelines.
> +Note that line lengths are acceptable up to 100 characters, which is in line with C recommendations.
> +
> +..

Presumably the bare ".." is some accidental leftover markup.


>   
>   Integrating with the Build System
>   ---------------------------------
> diff --git a/dts/pyproject.toml b/dts/pyproject.toml
> index 6762edfa6b..980ac3c7db 100644
> --- a/dts/pyproject.toml
> +++ b/dts/pyproject.toml
> @@ -41,7 +41,7 @@ build-backend = "poetry.core.masonry.api"
>   [tool.pylama]
>   linters = "mccabe,pycodestyle,pyflakes"
>   format = "pylint"
> -max_line_length = 88 # https://black.readthedocs.io/en/stable/the_black_code_style/current_style.html#line-length
> +max_line_length = 100
>   
>   [tool.mypy]
>   python_version = "3.10"
> @@ -55,4 +55,4 @@ profile = "black"
>   [tool.black]
>   target-version = ['py310']
>   include = '\.pyi?$'
> -line-length = 88 # https://black.readthedocs.io/en/stable/the_black_code_style/current_style.html#line-length
> +line-length = 100

The rest looks good. Wholeheartedly support longer line length.
  
Juraj Linkeš Oct. 13, 2023, 7:56 a.m. UTC | #2
On Thu, Oct 12, 2023 at 2:52 PM Paul Szczepanek <paul.szczepanek@arm.com> wrote:
>
>
> On 28/09/2023 13:18, Juraj Linkeš wrote:
> > Unify with C recommendations which allow line length of up to 100
> > characters.
> >
> > Signed-off-by: Owen Hilyard <ohilyard@iol.unh.edu>
> > Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
> > ---
> >   .editorconfig                            | 2 +-
> >   doc/doc_build/meson-private/meson.lock   | 0
> >   doc/guides/contributing/coding_style.rst | 3 +++
> >   dts/pyproject.toml                       | 4 ++--
> >   4 files changed, 6 insertions(+), 3 deletions(-)
> >   create mode 100644 doc/doc_build/meson-private/meson.lock
> >
> > diff --git a/.editorconfig b/.editorconfig
> > index ab41c95085..1e7d74213f 100644
> > --- a/.editorconfig
> > +++ b/.editorconfig
> > @@ -16,7 +16,7 @@ max_line_length = 100
> >   [*.py]
> >   indent_style = space
> >   indent_size = 4
> > -max_line_length = 79
> > +max_line_length = 100
> >
> >   [meson.build]
> >   indent_style = space
> > diff --git a/doc/doc_build/meson-private/meson.lock b/doc/doc_build/meson-private/meson.lock
> > new file mode 100644
> > index 0000000000..e69de29bb2
> > diff --git a/doc/guides/contributing/coding_style.rst b/doc/guides/contributing/coding_style.rst
> > index 648849899d..a42cd3d58d 100644
> > --- a/doc/guides/contributing/coding_style.rst
> > +++ b/doc/guides/contributing/coding_style.rst
> > @@ -880,6 +880,9 @@ All Python code should be compliant with
> >   `PEP8 (Style Guide for Python Code) <https://www.python.org/dev/peps/pep-0008/>`_.
> >
> >   The ``pep8`` tool can be used for testing compliance with the guidelines.
> > +Note that line lengths are acceptable up to 100 characters, which is in line with C recommendations.
> > +
> > +..
>
> Presumably the bare ".." is some accidental leftover markup.
>

I'll fix this in the next version.

>
> >
> >   Integrating with the Build System
> >   ---------------------------------
> > diff --git a/dts/pyproject.toml b/dts/pyproject.toml
> > index 6762edfa6b..980ac3c7db 100644
> > --- a/dts/pyproject.toml
> > +++ b/dts/pyproject.toml
> > @@ -41,7 +41,7 @@ build-backend = "poetry.core.masonry.api"
> >   [tool.pylama]
> >   linters = "mccabe,pycodestyle,pyflakes"
> >   format = "pylint"
> > -max_line_length = 88 # https://black.readthedocs.io/en/stable/the_black_code_style/current_style.html#line-length
> > +max_line_length = 100
> >
> >   [tool.mypy]
> >   python_version = "3.10"
> > @@ -55,4 +55,4 @@ profile = "black"
> >   [tool.black]
> >   target-version = ['py310']
> >   include = '\.pyi?$'
> > -line-length = 88 # https://black.readthedocs.io/en/stable/the_black_code_style/current_style.html#line-length
> > +line-length = 100
>
> The rest looks good. Wholeheartedly support longer line length.
>

Thanks, please send your ack's in the new version.

>
  

Patch

diff --git a/.editorconfig b/.editorconfig
index ab41c95085..1e7d74213f 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -16,7 +16,7 @@  max_line_length = 100
 [*.py]
 indent_style = space
 indent_size = 4
-max_line_length = 79
+max_line_length = 100
 
 [meson.build]
 indent_style = space
diff --git a/doc/doc_build/meson-private/meson.lock b/doc/doc_build/meson-private/meson.lock
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/doc/guides/contributing/coding_style.rst b/doc/guides/contributing/coding_style.rst
index 648849899d..a42cd3d58d 100644
--- a/doc/guides/contributing/coding_style.rst
+++ b/doc/guides/contributing/coding_style.rst
@@ -880,6 +880,9 @@  All Python code should be compliant with
 `PEP8 (Style Guide for Python Code) <https://www.python.org/dev/peps/pep-0008/>`_.
 
 The ``pep8`` tool can be used for testing compliance with the guidelines.
+Note that line lengths are acceptable up to 100 characters, which is in line with C recommendations.
+
+..
 
 Integrating with the Build System
 ---------------------------------
diff --git a/dts/pyproject.toml b/dts/pyproject.toml
index 6762edfa6b..980ac3c7db 100644
--- a/dts/pyproject.toml
+++ b/dts/pyproject.toml
@@ -41,7 +41,7 @@  build-backend = "poetry.core.masonry.api"
 [tool.pylama]
 linters = "mccabe,pycodestyle,pyflakes"
 format = "pylint"
-max_line_length = 88 # https://black.readthedocs.io/en/stable/the_black_code_style/current_style.html#line-length
+max_line_length = 100
 
 [tool.mypy]
 python_version = "3.10"
@@ -55,4 +55,4 @@  profile = "black"
 [tool.black]
 target-version = ['py310']
 include = '\.pyi?$'
-line-length = 88 # https://black.readthedocs.io/en/stable/the_black_code_style/current_style.html#line-length
+line-length = 100