Adjusting actions

This commit is contained in:
vitor-aignosi
2025-05-19 16:51:22 -03:00
parent 451dc5fbb7
commit 7822a41040
2 changed files with 4 additions and 4 deletions

View File

@@ -63,7 +63,7 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install -r ${{ steps.prepare-requirements.outputs.PROCESSED_REQUIREMENTS_FILE }}
pip install pytest pytest-cov
pip install pytest pytest-cov pytest-asyncio
- name: ⬇️ Setup Node.js 18
uses: actions/setup-node@v4

View File

@@ -44,7 +44,7 @@ class Faker(BaseActivity):
"""
topic = input_data.get('topic')
num_messages = input_data.get(
'num_messages', random.randint(1, len(self.tags)))
'num_messages', random.randint(1, len(self.tags))) # NOSONAR
if not topic:
raise ValueError("Topic must be specified in input_data")
@@ -54,11 +54,11 @@ class Faker(BaseActivity):
for _ in range(num_messages):
# Select random tag and name
tag = random.choice(list(self.tags.keys()))
tag = random.choice(list(self.tags.keys())) # NOSONAR
name = self.tags[tag]
# Generate random value between 0 and 100
if random.random() < 0.1:
if random.random() < 0.1: # NOSONAR
value = None
else:
value = round(random.uniform(0, 100), 2)