Skip to content

Commit

Permalink
Shorten the lines
Browse files Browse the repository at this point in the history
  • Loading branch information
traut committed Feb 7, 2025
1 parent c84f8e3 commit 06b4b2f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions detection_rules/devtools.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,13 @@ def build_release(ctx: click.Context, config_file, update_version_lock: bool, ge
minor=current_pkg_version.minor, patch=current_pkg_version.patch)

hist_versions_num = (
MAX_HISTORICAL_VERSIONS_FOR_DIFF if current_pkg_version_no_prerelease >= MIN_DIFF_FEATURE_VERSION else MAX_HISTORICAL_VERSIONS_PRE_DIFF
MAX_HISTORICAL_VERSIONS_FOR_DIFF
if current_pkg_version_no_prerelease >= MIN_DIFF_FEATURE_VERSION
else MAX_HISTORICAL_VERSIONS_PRE_DIFF
)
click.echo(f'[+] Limit historical rule versions in the release package for version {current_pkg_version_no_prerelease}: {hist_versions_num} versions')
click.echo(
'[+] Limit historical rule versions in the release package for '
f'version {current_pkg_version_no_prerelease}: {hist_versions_num} versions')
limited_historical_rules = sde.keep_latest_versions(historical_rules, num_versions=hist_versions_num)

package.add_historical_rules(limited_historical_rules, registry_data['version'])
Expand Down

0 comments on commit 06b4b2f

Please sign in to comment.