Skip to content

Enable flake8-logging-format in Ruff #278

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

Merged
merged 1 commit into from
Apr 12, 2025
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
1 change: 1 addition & 0 deletions .ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ select = [
"F", # pyflakes
"FA", # flake8-future-annotations
"FLY", # flynt
"G", # flake8-logging-format
"I", # isort
"N", # pep8-naming
"PERF", # perflint
Expand Down
13 changes: 7 additions & 6 deletions build_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -1066,20 +1066,21 @@
env_conf_file = dbs_site_config
else:
logging.info(
"No environment variables configured. "
f"Configure in {dbs_site_config} or {dbs_user_config}."
"No environment variables configured. Configure in %s or %s.",
dbs_site_config,
dbs_user_config,
)
return

logging.info(f"Reading environment variables from {env_conf_file}.")
logging.info("Reading environment variables from %s.", env_conf_file)

Check warning on line 1075 in build_docs.py

View check run for this annotation

Codecov / codecov/patch

build_docs.py#L1075

Added line #L1075 was not covered by tests
if env_conf_file == dbs_site_config:
logging.info(f"You can override settings in {dbs_user_config}.")
logging.info("You can override settings in %s.", dbs_user_config)

Check warning on line 1077 in build_docs.py

View check run for this annotation

Codecov / codecov/patch

build_docs.py#L1077

Added line #L1077 was not covered by tests
elif dbs_site_config.is_file():
logging.info(f"Overriding {dbs_site_config}.")
logging.info("Overriding %s.", dbs_site_config)

Check warning on line 1079 in build_docs.py

View check run for this annotation

Codecov / codecov/patch

build_docs.py#L1079

Added line #L1079 was not covered by tests

env_config = env_conf_file.read_text(encoding="utf-8")
for key, value in tomlkit.parse(env_config).get("env", {}).items():
logging.debug(f"Setting {key} in environment.")
logging.debug("Setting %s in environment.", key)

Check warning on line 1083 in build_docs.py

View check run for this annotation

Codecov / codecov/patch

build_docs.py#L1083

Added line #L1083 was not covered by tests
os.environ[key] = value


Expand Down