Skip to content

Commit 8409a7f

Browse files
authored
Update line length limit to 120 characters (aws-observability#7)
79 characters was very agressive and decreased readability. Increase to 120 for a more modern limit. Also applied the linter with python scripts/eachdist.py lint. By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
2 parents f4bb1dd + 67db756 commit 8409a7f

File tree

6 files changed

+8
-19
lines changed

6 files changed

+8
-19
lines changed

.isort.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
include_trailing_comma=True
33
force_grid_wrap=0
44
use_parentheses=True
5-
line_length=79
5+
line_length=120
66
profile=black
77

88
; 3 stands for Vertical Hanging Indent, e.g.

.pylintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ indent-after-paren=4
264264
indent-string=' '
265265

266266
# Maximum number of characters on a single line.
267-
max-line-length=79
267+
max-line-length=120
268268

269269
# Maximum number of lines in a module.
270270
max-module-lines=1000

checkers/file_header_checker.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33

44
from pylint.checkers import BaseRawFileChecker
55

6-
COPYWRITE_STRING = (
7-
"# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n"
8-
)
6+
COPYWRITE_STRING = "# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n"
97
COPYWRITE_BYTES = bytes(COPYWRITE_STRING, "utf-8")
108
LICENSE_STRING = "# SPDX-License-Identifier: Apache-2.0"
119
LICENSE_BYTES = bytes(LICENSE_STRING, "utf-8")
@@ -17,9 +15,7 @@ class FileHeaderChecker(BaseRawFileChecker):
1715
"E1234": (
1816
"File has missing or malformed header",
1917
"missing-header",
20-
"All files must have required header: \n"
21-
+ COPYWRITE_STRING
22-
+ LICENSE_STRING,
18+
"All files must have required header: \n" + COPYWRITE_STRING + LICENSE_STRING,
2319
),
2420
}
2521
options = ()

opentelemetry-distro/tests/amazon/opentelemetry/distro/test_aws_opentelementry_configurator.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@
33

44
from unittest import TestCase
55

6-
from opentelemetry.distro.aws_opentelemetry_configurator import (
7-
AwsOpenTelemetryConfigurator,
8-
AwsTracerProvider,
9-
)
6+
from opentelemetry.distro.aws_opentelemetry_configurator import AwsOpenTelemetryConfigurator, AwsTracerProvider
107

118

129
class TestAwsOpenTelemetryConfigurator(TestCase):

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tool.black]
2-
line-length = 79
2+
line-length = 120
33
exclude = '''
44
(
55
\.git

scripts/check_for_valid_readme.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,8 @@ def is_valid_rst(path):
1616

1717

1818
def parse_args():
19-
parser = argparse.ArgumentParser(
20-
description="Checks README.rst file in path for syntax errors."
21-
)
22-
parser.add_argument(
23-
"paths", nargs="+", help="paths containing a README.rst to test"
24-
)
19+
parser = argparse.ArgumentParser(description="Checks README.rst file in path for syntax errors.")
20+
parser.add_argument("paths", nargs="+", help="paths containing a README.rst to test")
2521
parser.add_argument("-v", "--verbose", action="store_true")
2622
return parser.parse_args()
2723

0 commit comments

Comments
 (0)