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

Update line length limit to 120 characters #7

Merged
merged 1 commit into from
Jan 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .isort.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
include_trailing_comma=True
force_grid_wrap=0
use_parentheses=True
line_length=79
line_length=120
profile=black

; 3 stands for Vertical Hanging Indent, e.g.
Expand Down
2 changes: 1 addition & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ indent-after-paren=4
indent-string=' '

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

# Maximum number of lines in a module.
max-module-lines=1000
Expand Down
8 changes: 2 additions & 6 deletions checkers/file_header_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@

from pylint.checkers import BaseRawFileChecker

COPYWRITE_STRING = (
"# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n"
)
COPYWRITE_STRING = "# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n"
COPYWRITE_BYTES = bytes(COPYWRITE_STRING, "utf-8")
LICENSE_STRING = "# SPDX-License-Identifier: Apache-2.0"
LICENSE_BYTES = bytes(LICENSE_STRING, "utf-8")
Expand All @@ -17,9 +15,7 @@ class FileHeaderChecker(BaseRawFileChecker):
"E1234": (
"File has missing or malformed header",
"missing-header",
"All files must have required header: \n"
+ COPYWRITE_STRING
+ LICENSE_STRING,
"All files must have required header: \n" + COPYWRITE_STRING + LICENSE_STRING,
),
}
options = ()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@

from unittest import TestCase

from opentelemetry.distro.aws_opentelemetry_configurator import (
AwsOpenTelemetryConfigurator,
AwsTracerProvider,
)
from opentelemetry.distro.aws_opentelemetry_configurator import AwsOpenTelemetryConfigurator, AwsTracerProvider


class TestAwsOpenTelemetryConfigurator(TestCase):
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tool.black]
line-length = 79
line-length = 120
exclude = '''
(
\.git
Expand Down
8 changes: 2 additions & 6 deletions scripts/check_for_valid_readme.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,8 @@ def is_valid_rst(path):


def parse_args():
parser = argparse.ArgumentParser(
description="Checks README.rst file in path for syntax errors."
)
parser.add_argument(
"paths", nargs="+", help="paths containing a README.rst to test"
)
parser = argparse.ArgumentParser(description="Checks README.rst file in path for syntax errors.")
parser.add_argument("paths", nargs="+", help="paths containing a README.rst to test")
parser.add_argument("-v", "--verbose", action="store_true")
return parser.parse_args()

Expand Down
Loading