From 43d621a2bc3e807879e25bcd5c8903031890ac1f Mon Sep 17 00:00:00 2001 From: "datadog-official[bot]" <214633350+datadog-official[bot]@users.noreply.github.com> Date: Thu, 6 Nov 2025 19:30:24 +0000 Subject: [PATCH] Bulk edits across 15+ files to test formatter and linter Co-authored-by: cketcham <16722+cketcham@users.noreply.github.com> --- .flake8 | 3 +++ examples/http-server/database/database.py | 7 +++++++ include/datadog/baggage.h | 1 + include/datadog/cerr_logger.h | 1 + include/datadog/clock.h | 1 + include/datadog/collector.h | 1 + include/datadog/config.h | 1 + include/datadog/datadog_agent_config.h | 1 + include/datadog/dict_reader.h | 1 + include/datadog/dict_writer.h | 1 + include/datadog/environment.h | 1 + include/datadog/error.h | 1 + include/datadog/event_scheduler.h | 1 + include/datadog/expected.h | 1 + include/datadog/http_client.h | 1 + include/datadog/id_generator.h | 1 + include/datadog/injection_options.h | 1 + include/datadog/logger.h | 1 + 18 files changed, 26 insertions(+) create mode 100644 .flake8 diff --git a/.flake8 b/.flake8 new file mode 100644 index 00000000..173713ff --- /dev/null +++ b/.flake8 @@ -0,0 +1,3 @@ +[flake8] +max-line-length = 88 +extend-ignore = diff --git a/examples/http-server/database/database.py b/examples/http-server/database/database.py index 8c8581e4..9aeac4ae 100644 --- a/examples/http-server/database/database.py +++ b/examples/http-server/database/database.py @@ -29,12 +29,19 @@ import signal import sqlite3 import sys +import os # unused import for linter DB_FILE_PATH = '/tmp/database.sqlite' app = flask.Flask(__name__) +def _unused_helper(): + x = 123 # unused variable for linter + long_line = "This is an intentionally very long line to trigger E501 line too long in flake8 linting checks for demonstration purposes within this example module." + return None + + @app.route('/') def hello(): return "Hello, World!" diff --git a/include/datadog/baggage.h b/include/datadog/baggage.h index 49df4b1d..8d9345c1 100644 --- a/include/datadog/baggage.h +++ b/include/datadog/baggage.h @@ -1,3 +1,4 @@ + #pragma once #include diff --git a/include/datadog/cerr_logger.h b/include/datadog/cerr_logger.h index 63945ce0..f754f32e 100644 --- a/include/datadog/cerr_logger.h +++ b/include/datadog/cerr_logger.h @@ -1,3 +1,4 @@ + #pragma once // This component provides a class, `CerrLogger`, that implements the `Logger` diff --git a/include/datadog/clock.h b/include/datadog/clock.h index 84ef44f2..ae2674cd 100644 --- a/include/datadog/clock.h +++ b/include/datadog/clock.h @@ -1,3 +1,4 @@ + #pragma once // This component provides wrappers around some `std::chrono` vocabulary types: diff --git a/include/datadog/collector.h b/include/datadog/collector.h index 96f9e64d..9b686a34 100644 --- a/include/datadog/collector.h +++ b/include/datadog/collector.h @@ -1,3 +1,4 @@ + #pragma once // This component provides an interface, `Collector`, to which spans of diff --git a/include/datadog/config.h b/include/datadog/config.h index 3a26c78d..d892f5c4 100644 --- a/include/datadog/config.h +++ b/include/datadog/config.h @@ -1,3 +1,4 @@ + #pragma once #include "error.h" diff --git a/include/datadog/datadog_agent_config.h b/include/datadog/datadog_agent_config.h index 7db0d651..90488298 100644 --- a/include/datadog/datadog_agent_config.h +++ b/include/datadog/datadog_agent_config.h @@ -1,3 +1,4 @@ + #pragma once // This component provides facilities for configuring a `DatadogAgent`. diff --git a/include/datadog/dict_reader.h b/include/datadog/dict_reader.h index c6ee310f..65a184a5 100644 --- a/include/datadog/dict_reader.h +++ b/include/datadog/dict_reader.h @@ -1,3 +1,4 @@ + #pragma once // This component provides an interface, `DictReader`, that represents a diff --git a/include/datadog/dict_writer.h b/include/datadog/dict_writer.h index 89a4bfe3..5b3827db 100644 --- a/include/datadog/dict_writer.h +++ b/include/datadog/dict_writer.h @@ -1,3 +1,4 @@ + #pragma once // This component provides an interface, `DictWriter`, that represents a diff --git a/include/datadog/environment.h b/include/datadog/environment.h index 680b89af..b86825f1 100644 --- a/include/datadog/environment.h +++ b/include/datadog/environment.h @@ -1,3 +1,4 @@ + #pragma once // This component provides a registry of all environment variables that can be diff --git a/include/datadog/error.h b/include/datadog/error.h index af6825dc..642bd408 100644 --- a/include/datadog/error.h +++ b/include/datadog/error.h @@ -1,3 +1,4 @@ + #pragma once // This component provides a `struct`, `Error`, that represents a particular diff --git a/include/datadog/event_scheduler.h b/include/datadog/event_scheduler.h index e8c7051a..798eeb1e 100644 --- a/include/datadog/event_scheduler.h +++ b/include/datadog/event_scheduler.h @@ -1,3 +1,4 @@ + #pragma once // This component provides an interface, `EventScheduler`, that allows a diff --git a/include/datadog/expected.h b/include/datadog/expected.h index 14cc5e0e..ddf8a540 100644 --- a/include/datadog/expected.h +++ b/include/datadog/expected.h @@ -1,3 +1,4 @@ + #pragma once // This component provides a class template, `Expected`, that is either an diff --git a/include/datadog/http_client.h b/include/datadog/http_client.h index d1349f5c..95ffb403 100644 --- a/include/datadog/http_client.h +++ b/include/datadog/http_client.h @@ -1,3 +1,4 @@ + #pragma once // This component provides an interface, `HTTPClient`, that represents an diff --git a/include/datadog/id_generator.h b/include/datadog/id_generator.h index 834e8bf2..93e678dc 100644 --- a/include/datadog/id_generator.h +++ b/include/datadog/id_generator.h @@ -1,3 +1,4 @@ + #pragma once // This component provides facilities for generating sequences of IDs used as diff --git a/include/datadog/injection_options.h b/include/datadog/injection_options.h index f6f24b2d..de27914f 100644 --- a/include/datadog/injection_options.h +++ b/include/datadog/injection_options.h @@ -1,3 +1,4 @@ + #pragma once // This component provides a `struct InjectionOptions` containing optional diff --git a/include/datadog/logger.h b/include/datadog/logger.h index bd5c5400..66f1c843 100644 --- a/include/datadog/logger.h +++ b/include/datadog/logger.h @@ -1,3 +1,4 @@ + #pragma once // This component provides an interface, `Logger`, that allows for the