Skip to content

Commit 0110bb1

Browse files
authored
Update line length to 120 (open-telemetry#5514)
* Update line length to 120 * Upgrade uv * Revert "Upgrade uv" This reverts commit 2448d80.
1 parent 7bccdfc commit 0110bb1

370 files changed

Lines changed: 4206 additions & 13116 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/generate_workflows.py

Lines changed: 9 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@
1313
r"(?P<name>[-\w]+\w)-?(?P<test_requirements>\d+)?"
1414
)
1515
_tox_lint_env_regex = re_compile(r"lint-(?P<name>[-\w]+)")
16-
_tox_contrib_env_regex = re_compile(
17-
r"py310-test-(?P<name>[-\w]+\w)-?(?P<contrib_requirements>\d+)?"
18-
)
16+
_tox_contrib_env_regex = re_compile(r"py310-test-(?P<name>[-\w]+\w)-?(?P<contrib_requirements>\d+)?")
1917

2018

2119
def get_tox_envs(tox_ini_path: Path) -> list:
@@ -25,9 +23,7 @@ def get_tox_envs(tox_ini_path: Path) -> list:
2523

2624
tox_section = next(tox_ini.sections())
2725

28-
core_config_set = CoreConfigSet(
29-
conf, tox_section, tox_ini_path.parent, tox_ini_path
30-
)
26+
core_config_set = CoreConfigSet(conf, tox_section, tox_ini_path.parent, tox_ini_path)
3127

3228
(
3329
core_config_set.loaders.extend(
@@ -67,9 +63,7 @@ def get_test_job_datas(tox_envs: list, operating_systems: list) -> list:
6763

6864
groups = tox_test_env_match.groupdict()
6965

70-
aliased_python_version = python_version_alias[
71-
groups["python_version"]
72-
]
66+
aliased_python_version = python_version_alias[groups["python_version"]]
7367
tox_env = tox_test_env_match.string
7468

7569
test_requirements = groups["test_requirements"]
@@ -84,10 +78,7 @@ def get_test_job_datas(tox_envs: list, operating_systems: list) -> list:
8478
{
8579
"name": f"{tox_env}_{operating_system}",
8680
"ui_name": (
87-
f"{groups['name']}"
88-
f"{test_requirements}"
89-
f"{aliased_python_version} "
90-
f"{os_alias[operating_system]}"
81+
f"{groups['name']}{test_requirements}{aliased_python_version} {os_alias[operating_system]}"
9182
),
9283
"python_version": aliased_python_version,
9384
"tox_env": tox_env,
@@ -128,21 +119,15 @@ def get_misc_job_datas(tox_envs: list) -> list:
128119
re_compile(r"benchmark.+"),
129120
]
130121

131-
return [
132-
tox_env
133-
for tox_env in tox_envs
134-
if not any(pattern.match(tox_env) for pattern in regex_patterns)
135-
]
122+
return [tox_env for tox_env in tox_envs if not any(pattern.match(tox_env) for pattern in regex_patterns)]
136123

137124

138125
def _generate_workflow(
139126
job_datas: list,
140127
template_name: str,
141128
output_dir: Path,
142129
) -> None:
143-
env = Environment(
144-
loader=FileSystemLoader(Path(__file__).parent.joinpath("templates"))
145-
)
130+
env = Environment(loader=FileSystemLoader(Path(__file__).parent.joinpath("templates")))
146131
with open(output_dir.joinpath(f"{template_name}.yml"), "w") as yml_file:
147132
yml_file.write(
148133
env.get_template(f"{template_name}.yml.j2").render(
@@ -152,9 +137,7 @@ def _generate_workflow(
152137
yml_file.write("\n")
153138

154139

155-
def generate_test_workflow(
156-
tox_ini_path: Path, workflow_directory_path: Path, operating_systems
157-
) -> None:
140+
def generate_test_workflow(tox_ini_path: Path, workflow_directory_path: Path, operating_systems) -> None:
158141
_generate_workflow(
159142
get_test_job_datas(get_tox_envs(tox_ini_path), operating_systems),
160143
"test",
@@ -189,11 +172,7 @@ def generate_ci_workflow(
189172
) -> None:
190173
with open(output_dir.joinpath("ci.yml"), "w") as ci_yml_file:
191174
ci_yml_file.write(
192-
Environment(
193-
loader=FileSystemLoader(
194-
Path(__file__).parent.joinpath("templates")
195-
)
196-
)
175+
Environment(loader=FileSystemLoader(Path(__file__).parent.joinpath("templates")))
197176
.get_template("ci.yml.j2")
198177
.render()
199178
)
@@ -203,9 +182,7 @@ def generate_ci_workflow(
203182
if __name__ == "__main__":
204183
tox_ini_path = Path(__file__).parent.parent.parent.joinpath("tox.ini")
205184
output_dir = Path(__file__).parent
206-
generate_test_workflow(
207-
tox_ini_path, output_dir, ["ubuntu-latest", "windows-latest"]
208-
)
185+
generate_test_workflow(tox_ini_path, output_dir, ["ubuntu-latest", "windows-latest"])
209186
generate_lint_workflow(tox_ini_path, output_dir)
210187
generate_misc_workflow(tox_ini_path, output_dir)
211188
generate_ci_workflow(output_dir)

.pylintrc

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

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

267267
# Maximum number of lines in a module.
268268
max-module-lines=1000

CHANGELOG.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -554,9 +554,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
554554
from opentelemetry.sdk._logs import ReadableLogRecord
555555

556556

557-
def export(
558-
self, batch: Sequence[ReadableLogRecord]
559-
) -> LogRecordExportResult: ...
557+
def export(self, batch: Sequence[ReadableLogRecord]) -> LogRecordExportResult: ...
560558
```
561559

562560
- **For Log Processors:** Use `ReadWriteLogRecord` for processing, `ReadableLogRecord` for exporting

0 commit comments

Comments
 (0)