Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Update misp_modules_result.html#34

Merged
DavidCruciani merged 1 commit into
flowintel:mainflowintel/flowintel:mainfrom
Rileyy-2:mainRileyy-2/flowintel:mainCopy head branch name to clipboard
Jul 30, 2025
Merged

Update misp_modules_result.html#34
DavidCruciani merged 1 commit into
flowintel:mainflowintel/flowintel:mainfrom
Rileyy-2:mainRileyy-2/flowintel:mainCopy head branch name to clipboard

Conversation

@Rileyy-2
Copy link
Copy Markdown
Contributor

Changing the "null" attribution to three attributes which overwrites potential previous set values. Instead, it attributes the "null" value only if the key is not set in the object.

Changing the "null" attribution to three attributes which overwrites potential previous set values. Instead, it attributes the "null" value only if the key is not set in the object.
@adulau adulau requested a review from DavidCruciani July 28, 2025 09:08
@DavidCruciani
Copy link
Copy Markdown
Contributor

Thanks for the modifications !

@DavidCruciani DavidCruciani merged commit 794675e into flowintel:main Jul 30, 2025
cudeso added a commit to cudeso/flowintel that referenced this pull request Jan 7, 2026
First part (77 of 322 issues) of changes.

- **[flowintel#2 WON'T FIX]** `Flowintel:app/account/account.py:192` – Define a constant instead of duplicating this literal 'account.login' 3 times.
  *(Rule: python:S1192, Type: CODE_SMELL, Severity: CRITICAL, Effort: 6min, Language: Python)*
  This is a false positive. The string 'account.login' is a Flask route identifier following the blueprint.function convention used with `url_for()`. This is idiomatic Flask code, not a duplicated magic string.
  Extracting it to a constant would:
  - Reduce readability (the route reference is self-documenting)
  - Add unnecessary indirection
  - Not provide meaningful protection (renaming the route/blueprint would require updates regardless)

- **[flowintel#3 FIXED]** `Flowintel:app/account/form.py:38` – Merge this if statement with the enclosing one.
  *(Rule: python:S1066, Type: CODE_SMELL, Severity: MAJOR, Effort: 5min, Language: Python)*
  Fixed. Merged the nested if statements.

- **[flowintel#4 FIXED]** `Flowintel:app/admin/admin.py:44` – Define a constant instead of duplicating this literal "/admin/orgs" 3 times.
  *(Rule: python:S1192, Type: CODE_SMELL, Severity: CRITICAL, Effort: 6min, Language: Python)*
  This should be addressed, but not with a constant. The better fix is to use Flask's `url_for('admin.orgs')` instead of hardcoded paths, which provides route validation and follows Flask conventions.

- **[flowintel#5 FIXED]** `Flowintel:app/admin/admin_api.py:76` – Define a constant instead of duplicating this literal "Please give data" 4 times.
  *(Rule: python:S1192, Type: CODE_SMELL, Severity: CRITICAL, Effort: 8min, Language: Python)*
  Rather than defining a constant, a shared API response utility is created (`error_no_data()`).

- **[flowintel#6 WON'T FIX]** `Flowintel:app/admin/admin_core.py:108` – Remove the unused local variable "user".
  *(Rule: python:S1481, Type: CODE_SMELL, Severity: MINOR, Effort: 5min, Language: Python)*
  This is a false positive. The variable `user` is used to loop through an array.

- **[flowintel#7 WON'T FIX]** `Flowintel:app/admin/admin_core_api.py:4` – Refactor this function to reduce its Cognitive Complexity from 18 to the 15 allowed.
  *(Rule: python:S3776, Type: CODE_SMELL, Severity: CRITICAL, Effort: 8min, Language: Python)*
  These are input validation functions with a flat structure checking each field sequentially. The cognitive complexity penalises the number of branches but does not account for the fact that the logic is linear and easy to follow. Refactoring would add abstraction without improving readability. The current implementation is clear, maintainable, and appropriate for its purpose.

- **[flowintel#8 WON'T FIX]** `Flowintel:app/admin/admin_core_api.py:35` – Refactor this function to reduce its Cognitive Complexity from 16 to the 15 allowed.
  *(Rule: python:S3776, Type: CODE_SMELL, Severity: CRITICAL, Effort: 6min, Language: Python)*
  Same rationale as above: flat sequential validation logic; refactoring would add abstraction without improving clarity.

- **[flowintel#9 FIXED]** `Flowintel:app/admin/form.py:63` – Merge this if statement with the enclosing one.
  *(Rule: python:S1066, Type: CODE_SMELL, Severity: MAJOR, Effort: 5min, Language: Python)*
  Fixed. Merged the nested if statements.

- **[flowintel#10 FIXED]** `Flowintel:app/admin/form.py:102` – Merge this if statement with the enclosing one.
  *(Rule: python:S1066, Type: CODE_SMELL, Severity: MAJOR, Effort: 5min, Language: Python)*
  Fixed. Merged the nested if statements.

- **[flowintel#11 FIXED]** `Flowintel:app/analyzer/misp_modules.py:3` – Import only needed names or import the module and then use its members.
  *(Rule: python:S2208, Type: CODE_SMELL, Severity: CRITICAL, Effort: 5min, Language: Python)*
  No database models from `db_class.db` are actually used.

- **[flowintel#12 FIXED]** `Flowintel:app/analyzer/misp_modules.py:148` – Remove this commented out code.
  *(Rule: python:S125, Type: CODE_SMELL, Severity: MAJOR, Effort: 5min, Language: Python)*
  Removed.

- **[flowintel#13 FIXED]** `Flowintel:app/analyzer/misp_modules.py:164` – Remove this commented out code.
  *(Rule: python:S125, Type: CODE_SMELL, Severity: MAJOR, Effort: 5min, Language: Python)*
  Removed.

- **[flowintel#14 FIXED]** `Flowintel:app/analyzer/misp_modules_core.py:3` – Import only needed names or import the module and then use its members.
  *(Rule: python:S2208, Type: CODE_SMELL, Severity: CRITICAL, Effort: 5min, Language: Python)*
  Fixed. Replaced `from ..db_class.db import *` with explicit imports.

- **[flowintel#15 FIXED]** `Flowintel:app/analyzer/misp_modules_core.py:70` – Merge this if statement with the enclosing one.
  *(Rule: python:S1066, Type: CODE_SMELL, Severity: MAJOR, Effort: 5min, Language: Python)*
  Fixed. Merged the nested if statements.

- **[flowintel#16 FIXED]** `Flowintel:app/analyzer/misp_modules_core.py:132` – Merge this if statement with the enclosing one.
  *(Rule: python:S1066, Type: CODE_SMELL, Severity: MAJOR, Effort: 5min, Language: Python)*
  Fixed. Merged the nested if statements.

- **[flowintel#17 WON'T FIX]** `Flowintel:app/analyzer/misp_modules_core.py:138` – Refactor this function to reduce its Cognitive Complexity from 17 to the 15 allowed.
  *(Rule: python:S3776, Type: CODE_SMELL, Severity: CRITICAL, Effort: 7min, Language: Python)*
  Input validation with multiple simple checks; complexity comes from the number of fields, not muddled logic. Refactoring would fragment clear code.

- **[flowintel#18 FIXED]** `Flowintel:app/analyzer/session_class.py:13` – Rename class "Session_class" to match the naming convention.
  *(Rule: python:S101, Type: CODE_SMELL, Severity: MINOR, Effort: 5min, Language: Python)*
  Fixed. Renamed `Session_class` to `SessionClass` following Python's PascalCase naming convention for classes.

- **[flowintel#19 WON'T FIX]** `Flowintel:app/analyzer/session_class.py:99` – Refactor this function to reduce its Cognitive Complexity from 45 to the 15 allowed.
  *(Rule: python:S3776, Type: CODE_SMELL, Severity: CRITICAL, Effort: 35min, Language: Python)*
  High complexity is caused by defensive checks on API response structures (optional keys like `"results"`, `"Object"`, `"error"`). This reflects real-world API variations, not poor design.

- **[flowintel#20 FIXED]** `Flowintel:app/analyzer/session_class.py:130` – Merge this if statement with the enclosing one.
  *(Rule: python:S1066, Type: CODE_SMELL, Severity: MAJOR, Effort: 5min, Language: Python)*
  Fixed. Merged the nested if statements.

- **[flowintel#21 FIXED]** `Flowintel:app/analyzer/session_class.py:131` – Merge this if statement with the enclosing one.
  *(Rule: python:S1066, Type: CODE_SMELL, Severity: MAJOR, Effort: 5min, Language: Python)*
  Fixed. Merged the nested if statements.

- **[flowintel#22 OPEN/FIXED]** `Flowintel:app/analyzer/session_class.py:167` – Remove this redundant return.
  *(Rule: python:S3626, Type: CODE_SMELL, Severity: MINOR, Effort: 1min, Language: Python)*
  Fixed. Removed redundant return at end of `save_info()`.

- **[flowintel#23 WON'T FIX]** `Flowintel:app/bin/recurring_notification.py:30` – Refactor this function to reduce its Cognitive Complexity from 28 to the 15 allowed.
  *(Rule: python:S3776, Type: CODE_SMELL, Severity: CRITICAL, Effort: 18min, Language: Python)*
  The function handles a finite set of recurring notification types (once, daily, weekly, monthly) with type-specific logic. The `if/elif` chain is the clearest expression of these branches.

- **[flowintel#24 FIXED]** `Flowintel:app/bin/recurring_notification.py:37` – Merge this if statement with the enclosing one.
  *(Rule: python:S1066, Type: CODE_SMELL, Severity: MAJOR, Effort: 5min, Language: Python)*
  Fixed. Merged the nested if statements.

- **[flowintel#25 FIXED]** `Flowintel:app/bin/recurring_notification.py:40` – Define a constant instead of duplicating this literal "fa-solid fa-clock" 4 times.
  *(Rule: python:S1192, Type: CODE_SMELL, Severity: CRITICAL, Effort: 8min, Language: Python)*
  Fixed. Added `REMINDER_ICON = "fa-solid fa-clock"` constant and replaced all 4 occurrences.

- **[flowintel#26 FIXED]** `Flowintel:app/bin/recurring_notification.py:54` – Merge this if statement with the enclosing one.
  *(Rule: python:S1066, Type: CODE_SMELL, Severity: MAJOR, Effort: 5min, Language: Python)*
  Fixed. Merged the nested if statements.

- **[flowintel#27 FIXED]** `Flowintel:app/case/CaseCore.py:19` – Import only needed names or import the module and then use its members.
  *(Rule: python:S2208, Type: CODE_SMELL, Severity: CRITICAL, Effort: 5min, Language: Python)*
  Replaced `from ..db_class.db import *` with explicit imports of the models used.

- **[flowintel#28 WON'T FIX]** `Flowintel:app/case/CaseCore.py:62` – Refactor this function to reduce its Cognitive Complexity from 23 to the 15 allowed.
  *(Rule: python:S3776, Type: CODE_SMELL, Severity: CRITICAL, Effort: 13min, Language: Python)*
  This function creates a case either from templates or from scratch, then attaches tags, clusters, custom tags, and task templates. The branching matches business requirements; further splitting would harm readability.

- **[flowintel#29 FIXED]** `Flowintel:app/case/CaseCore.py:64` – Remove this unneeded "pass".
  *(Rule: python:S2772, Type: CODE_SMELL, Severity: MINOR, Effort: 2min, Language: Python)*
  Removed unnecessary `pass` statement.

- **[flowintel#30 WON'T FIX]** `Flowintel:app/case/CaseCore.py:118` – Refactor this function to reduce its Cognitive Complexity from 38 to the 15 allowed.
  *(Rule: python:S3776, Type: CODE_SMELL, Severity: CRITICAL, Effort: 28min, Language: Python)*
  Imports a MISP event into a case, handling tags, galaxies, objects and connector instances. The complexity reflects the MISP data model.

- **[flowintel#31 FIXED]** `Flowintel:app/case/CaseCore.py:128` – Merge this if statement with the enclosing one.
  *(Rule: python:S1066, Type: CODE_SMELL, Severity: MAJOR, Effort: 5min, Language: Python)*
  Fixed. Merged the nested if statements.

- **[flowintel#32 FIXED]** `Flowintel:app/case/CaseCore.py:135` – Merge this if statement with the enclosing one.
  *(Rule: python:S1066, Type: CODE_SMELL, Severity: MAJOR, Effort: 5min, Language: Python)*
  Fixed. Merged the nested if statements.

- **[flowintel#33 FIXED]** `Flowintel:app/case/CaseCore.py:183` – Specify an exception class to catch or reraise the exception.
  *(Rule: python:S5754, Type: CODE_SMELL, Severity: CRITICAL, Effort: 5min, Language: Python)*
  Changed bare `except:` to `except OSError:`.

- **[flowintel#34 WON'T FIX]** `Flowintel:app/case/CaseCore.py:315` – Refactor this function to reduce its Cognitive Complexity from 24 to the 15 allowed.
  *(Rule: python:S3776, Type: CODE_SMELL, Severity: CRITICAL, Effort: 14min, Language: Python)*
  Handles case sorting with multiple filter combinations and privacy filtering. The complexity comes from legitimate combinations of filters.

- **[flowintel#35 FIXED]** `Flowintel:app/case/CaseCore.py:336` – Merge this if statement with the enclosing one.
  *(Rule: python:S1066, Type: CODE_SMELL, Severity: MAJOR, Effort: 5min, Language: Python)*
  Fixed. Merged the nested if statements.

- **[flowintel#36 FIXED]** `Flowintel:app/case/CaseCore.py:425` – Remove or refactor this statement; it has no side effects.
  *(Rule: python:S905, Type: BUG, Severity: MAJOR, Effort: 10min, Language: Python)*
  Removed orphaned `task` statement.

- **[flowintel#37 FIXED]** `Flowintel:app/case/CaseCore.py:469` – Specify an exception class to catch or reraise the exception.
  *(Rule: python:S5754, Type: CODE_SMELL, Severity: CRITICAL, Effort: 5min, Language: Python)*
  Changed bare `except:` to `except AttributeError:`.

- **[flowintel#38 WON'T FIX]** `Flowintel:app/case/CaseCore.py:485` – Refactor this function to reduce its Cognitive Complexity from 23 to the 15 allowed.
  *(Rule: python:S3776, Type: CODE_SMELL, Severity: CRITICAL, Effort: 13min, Language: Python)*
  High measured complexity reflects inherent business logic which would not benefit from refactoring.

- **[flowintel#39 WON'T FIX]** `Flowintel:app/case/CaseCore.py:584` – Refactor this function to reduce its Cognitive Complexity from 26 to the 15 allowed.
  *(Rule: python:S3776, Type: CODE_SMELL, Severity: CRITICAL, Effort: 16min, Language: Python)*
  Same rationale as above.

- **[flowintel#40 WON'T FIX]** `Flowintel:app/case/CaseCore.py:667` – Refactor this function to reduce its Cognitive Complexity from 23 to the 15 allowed.
  *(Rule: python:S3776, Type: CODE_SMELL, Severity: CRITICAL, Effort: 13min, Language: Python)*
  Same rationale as above.

- **[flowintel#41 WON'T FIX]** `Flowintel:app/case/CaseCore.py:813` – Refactor this function to reduce its Cognitive Complexity from 19 to the 15 allowed.
  *(Rule: python:S3776, Type: CODE_SMELL, Severity: CRITICAL, Effort: 9min, Language: Python)*
  Same rationale as above.

- **[flowintel#42 WON'T FIX]** `Flowintel:app/case/CaseCore.py:867` – Refactor this function to reduce its Cognitive Complexity from 29 to the 15 allowed.
  *(Rule: python:S3776, Type: CODE_SMELL, Severity: CRITICAL, Effort: 19min, Language: Python)*
  Same rationale as above.

- **[flowintel#43 WON'T FIX]** `Flowintel:app/case/CaseCore.py:1006` – Remove this unexpected named argument 'download_name'.
  *(Rule: python:S930, Type: BUG, Severity: BLOCKER, Effort: 10min, Language: Python)*
  This is a false positive. The `download_name` parameter is the correct, current parameter for Flask's `send_file()` function.

- **[flowintel#44 FIXED]** `Flowintel:app/case/CaseCore.py:1076` – Remove this assignment to local variable 'case'; the value is never used.
  *(Rule: python:S1854, Type: CODE_SMELL, Severity: MAJOR, Effort: 15min, Language: Python)*
  The variable `case` is assigned and then immediately reassigned before use. The first assignment is redundant and was removed.

- **[flowintel#45 FIXED]** `Flowintel:app/case/CaseCore.py:1111` – Specify an exception class to catch or reraise the exception.
  *(Rule: python:S5754, Type: CODE_SMELL, Severity: CRITICAL, Effort: 5min, Language: Python)*
  Now catching `requests.exceptions.RequestException` which covers connection errors, timeouts, and other request failures.

- **[flowintel#46 FIXED]** `Flowintel:app/case/CaseCore.py:1142` – Merge this if statement with the enclosing one.
  *(Rule: python:S1066, Type: CODE_SMELL, Severity: MAJOR, Effort: 5min, Language: Python)*
  Fixed. Merged the nested if statements.

- **[flowintel#47 FIXED]** `Flowintel:app/case/CaseCore.py:1176` – Specify an exception class to catch or reraise the exception.
  *(Rule: python:S5754, Type: CODE_SMELL, Severity: CRITICAL, Effort: 5min, Language: Python)*
  Now catching `SQLAlchemyError` during delete/commit operations.

- **[flowintel#48 WON'T FIX]** `Flowintel:app/case/CaseCore.py:1260` – Merge this if statement with the enclosing one.
  *(Rule: python:S1066, Type: CODE_SMELL, Severity: MAJOR, Effort: 5min, Language: Python)*
  These are intentionally separate checks and are clearer when kept distinct.

- **[flowintel#49 WON'T FIX]** `Flowintel:app/case/CaseCore.py:1318` – Refactor this function to reduce its Cognitive Complexity from 17 to the 15 allowed.
  *(Rule: python:S3776, Type: CODE_SMELL, Severity: CRITICAL, Effort: 7min, Language: Python)*
  Handles MISP object/attribute processing which requires multiple field checks. Complexity is inherent to the domain.

- **[flowintel#50 FIXED]** `Flowintel:app/case/CaseCore.py:1327` – Define a constant instead of duplicating this literal '%Y-%m-%dT%H:%M' 6 times.
  *(Rule: python:S1192, Type: CODE_SMELL, Severity: CRITICAL, Effort: 12min, Language: Python)*
  Added `DATETIME_FORMAT = '%Y-%m-%dT%H:%M'` at module level and replaced all 6 occurrences.

- **[flowintel#51 WON'T FIX]** `Flowintel:app/case/CaseCore.py:1358` – Refactor this function to reduce its Cognitive Complexity from 19 to the 15 allowed.
  *(Rule: python:S3776, Type: CODE_SMELL, Severity: CRITICAL, Effort: 9min, Language: Python)*
  Same MISP processing rationale; splitting logic would fragment cohesive operations.

- **[flowintel#52 FIXED]** `Flowintel:app/case/CaseCore.py:1456` – Specify an exception class to catch or reraise the exception.
  *(Rule: python:S5754, Type: CODE_SMELL, Severity: CRITICAL, Effort: 5min, Language: Python)*
  Changed bare `except` to a more specific exception (implementation updated in code).

- **[flowintel#53 WON'T FIX]** `Flowintel:app/case/CaseCore.py:1605` – Refactor this function to reduce its Cognitive Complexity from 81 to the 15 allowed.
  *(Rule: python:S3776, Type: CODE_SMELL, Severity: CRITICAL, Effort: 1h11min, Language: Python)*
  Handles extensive MISP object/attribute processing. Complexity is inherent and further splitting would make debugging harder.

- **[flowintel#54 FIXED]** `Flowintel:app/case/CaseCore.py:1689` – Remove this commented out code.
  *(Rule: python:S125, Type: CODE_SMELL, Severity: MAJOR, Effort: 5min, Language: Python)*
  Removed.

- **[flowintel#55 FIXED]** `Flowintel:app/case/CommonAbstract.py:5` – Import only needed names or import the module and then use its members.
  *(Rule: python:S2208, Type: CODE_SMELL, Severity: CRITICAL, Effort: 5min, Language: Python)*
  Removed unused wildcard import.

- **[flowintel#56 FIXED]** `Flowintel:app/case/FilteringAbstract.py:4` – Import only needed names or import the module and then use its members.
  *(Rule: python:S2208, Type: CODE_SMELL, Severity: CRITICAL, Effort: 5min, Language: Python)*
  Replaced the wildcard import with explicit imports for all 21 models used in the file.

- **[flowintel#57 WON'T FIX]** `Flowintel:app/case/FilteringAbstract.py:37` – Refactor this function to reduce its Cognitive Complexity from 16 to the 15 allowed.
  *(Rule: python:S3776, Type: CODE_SMELL, Severity: CRITICAL, Effort: 6min, Language: Python)*
  These functions implement query-building and filtering logic that inherently requires multiple conditional branches.

- **[flowintel#58 WON'T FIX]** `Flowintel:app/case/FilteringAbstract.py:71` – Refactor this function to reduce its Cognitive Complexity from 18 to the 15 allowed.
  *(Rule: python:S3776, Type: CODE_SMELL, Severity: CRITICAL, Effort: 8min, Language: Python)*
  Same rationale as above.

- **[flowintel#59 FIXED]** `Flowintel:app/case/TaskCore.py:6` – Import only needed names or import the module and then use its members.
  *(Rule: python:S2208, Type: CODE_SMELL, Severity: CRITICAL, Effort: 5min, Language: Python)*
  Replaced the wildcard import with explicit imports for the 14 models used.

- **[flowintel#60 FIXED]** `Flowintel:app/case/TaskCore.py:133` – Specify an exception class to catch or reraise the exception.
  *(Rule: python:S5754, Type: CODE_SMELL, Severity: CRITICAL, Effort: 5min, Language: Python)*
  Changed `except:` → `except OSError:` for the file removal operation.

- **[flowintel#61 FIXED]** `Flowintel:app/case/TaskCore.py:182` – Remove this assignment to local variable 'message'; the value is never used.
  *(Rule: python:S1854, Type: CODE_SMELL, Severity: MAJOR, Effort: 15min, Language: Python)*
  Removed the two unused `message` assignments at lines 182 and 187. The variable is still correctly set inside the loop before being used in `create_notification_user`.

- **[flowintel#62 FIXED]** `Flowintel:app/case/TaskCore.py:187` – Remove this assignment to local variable 'message'; the value is never used.
  *(Rule: python:S1854, Type: CODE_SMELL, Severity: MAJOR, Effort: 15min, Language: Python)*
  Same as above; removed redundant assignments.

- **[flowintel#63 FIXED]** `Flowintel:app/case/TaskCore.py:201` – Refactor this function to reduce its Cognitive Complexity from 17 to the 15 allowed.
  *(Rule: python:S3776, Type: CODE_SMELL, Severity: CRITICAL, Effort: 7min, Language: Python)*
  Reduced complexity.

- **[flowintel#64 FIXED]** `Flowintel:app/case/TaskCore.py:349` – Merge this if statement with the enclosing one.
  *(Rule: python:S1066, Type: CODE_SMELL, Severity: MAJOR, Effort: 5min, Language: Python)*
  Fixed. Merged the nested if statements.

- **[flowintel#65 WON'T FIX]** `Flowintel:app/case/TaskCore.py:419` – Remove this unexpected named argument 'download_name'.
  *(Rule: python:S930, Type: BUG, Severity: BLOCKER, Effort: 10min, Language: Python)*
  This is a false positive. The `download_name` parameter is the correct, current parameter for Flask's `send_file()` function.

- **[flowintel#66 FIXED]** `Flowintel:app/case/TaskCore.py:426` – Specify an exception class to catch or reraise the exception.
  *(Rule: python:S5754, Type: CODE_SMELL, Severity: CRITICAL, Effort: 5min, Language: Python)*
  Changed `except:` → `except OSError:` for the file removal operation.

- **[flowintel#67 FIXED]** `Flowintel:app/case/TaskCore.py:445` – Rename this local variable "finalTask" to match the regular expression.
  *(Rule: python:S117, Type: CODE_SMELL, Severity: MINOR, Effort: 2min, Language: Python)*
  Renamed `finalTask` → `final_task` to follow Python snake_case naming convention.

- **[flowintel#68 WON'T FIX]** `Flowintel:app/case/TaskCore.py:470` – Refactor this function to reduce its Cognitive Complexity from 30 to the 15 allowed.
  *(Rule: python:S3776, Type: CODE_SMELL, Severity: CRITICAL, Effort: 20min, Language: Python)*
  This function implements task sorting and filtering with multiple filter modes (assigned_tasks, my_assignment, deadline, and attribute-based sorting). The complexity is inherent to the feature requirements.

- **[flowintel#69 FIXED]** `Flowintel:app/case/TaskCore.py:552` – Refactor this function to reduce its Cognitive Complexity from 16 to the 15 allowed.
  *(Rule: python:S3776, Type: CODE_SMELL, Severity: CRITICAL, Effort: 6min, Language: Python)*
  Reduced complexity by merging `CommonModel.get_user_instance_both(...)` and `instance.type == type_module` into a single condition, and by using a ternary expression for `identifier`.

- **[flowintel#70 FIXED]** `Flowintel:app/case/TaskCore.py:560` – Merge this if statement with the enclosing one.
  *(Rule: python:S1066, Type: CODE_SMELL, Severity: MAJOR, Effort: 5min, Language: Python)*
  Fixed in the same change as above.

- **[flowintel#71 FIXED]** `Flowintel:app/case/TaskCore.py:642` – Merge this if statement with the enclosing one.
  *(Rule: python:S1066, Type: CODE_SMELL, Severity: MAJOR, Effort: 5min, Language: Python)*
  Fixed. Merged the nested if statements.

- **[flowintel#72 FIXED]** `Flowintel:app/case/TaskCore.py:667` – Merge this if statement with the enclosing one.
  *(Rule: python:S1066, Type: CODE_SMELL, Severity: MAJOR, Effort: 5min, Language: Python)*
  Fixed. Merged the nested if statements.

- **[flowintel#73 FIXED]** `Flowintel:app/case/TaskCore.py:686` – Merge this if statement with the enclosing one.
  *(Rule: python:S1066, Type: CODE_SMELL, Severity: MAJOR, Effort: 5min, Language: Python)*
  Fixed. Merged the nested if statements.

- **[flowintel#74 FIXED]** `Flowintel:app/case/TaskCore.py:698` – Merge this if statement with the enclosing one.
  *(Rule: python:S1066, Type: CODE_SMELL, Severity: MAJOR, Effort: 5min, Language: Python)*
  Fixed. Merged the nested if statements.

- **[flowintel#75 FIXED]** `Flowintel:app/case/TaskCore.py:710` – Remove the unused local variable "s".
  *(Rule: python:S1481, Type: CODE_SMELL, Severity: MINOR, Effort: 5min, Language: Python)*
  Replaced with `len(...)`.

- **[flowintel#76 FIXED]** `Flowintel:app/case/TaskCore.py:728` – Merge this if statement with the enclosing one.
  *(Rule: python:S1066, Type: CODE_SMELL, Severity: MAJOR, Effort: 5min, Language: Python)*
  Fixed. Merged the nested if statements.

- **[flowintel#77 FIXED]** `Flowintel:app/case/TaskCore.py:759` – Remove the unused local variable "case".
  *(Rule: python:S1481, Type: CODE_SMELL, Severity: MINOR, Effort: 5min, Language: Python)*
  Removed.

- **[flowintel#78 FIXED]** `Flowintel:app/case/TaskCore.py:780` – Specify an exception class to catch or reraise the exception.
  *(Rule: python:S5754, Type: CODE_SMELL, Severity: CRITICAL, Effort: 5min, Language: Python)*
  Changed `except:` → `except SQLAlchemyError:` and added the necessary import.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.