Skip to content

Commit cb10be3

Browse files
Fix lint errors
1 parent f70cda5 commit cb10be3

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

detection_rules/devtools.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@
6464
)
6565
RULES_CONFIG = parse_rules_config()
6666
# The base package version that we will start to include all versions of historical rules
67-
BASE_PKG_VERSION = Version(major=8,minor=17,patch=0)
67+
BASE_PKG_VERSION = Version(major=8, minor=17, patch=0)
68+
6869

6970
def get_github_token() -> Optional[str]:
7071
"""Get the current user's GitHub token."""
@@ -128,12 +129,15 @@ def build_release(ctx: click.Context, config_file, update_version_lock: bool, ge
128129
current_pkg_version = Version.parse(registry_data['version'])
129130
# pre-release versions are not included in the version comparison
130131
# Version 8.17.0-beta.1 is considered lower than 8.17.0
131-
current_pkg_version_no_prerelease = Version(major=current_pkg_version.major,minor=current_pkg_version.minor,patch=current_pkg_version.patch)
132-
if current_pkg_version_no_prerelease>= BASE_PKG_VERSION:
133-
click.echo(f'[+] Adding all historical rule versions in our release package for version {current_pkg_version_no_prerelease}')
132+
current_pkg_version_no_prerelease = Version(major=current_pkg_version.major,
133+
minor=current_pkg_version.minor, patch=current_pkg_version.patch)
134+
if current_pkg_version_no_prerelease >= BASE_PKG_VERSION:
135+
click.echo(f'[+] Adding all historical rule versions in our release package for version \
136+
{current_pkg_version_no_prerelease}')
134137
limited_historical_rules = historical_rules
135138
else:
136-
click.echo(f'[+] Limit historical rule versions in our release package for version {current_pkg_version_no_prerelease}')
139+
click.echo(f'[+] Limit historical rule versions in our release package for version \
140+
{current_pkg_version_no_prerelease}')
137141
limited_historical_rules = sde.keep_latest_versions(historical_rules)
138142
package.add_historical_rules(limited_historical_rules, registry_data['version'])
139143
click.echo(f'[+] Adding historical rules from {previous_pkg_version} package')

0 commit comments

Comments
 (0)