Conversation
Remove not used JS code
exec is generally considered insecure and may trigger more security warnings in the future Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Update to use pyproject.toml
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR upgrades to version 1.1.2 by removing unused JavaScript assets, migrating to a pyproject.toml–based build, cleaning up debug statements, and enhancing type safety in API views.
- Removed legacy
setup.pyandrequirements-backup.txtin favor ofpyproject.toml - Deleted unused JS files under
static/jsand cleaned debugprintcalls - Added type annotations in
flowapp/views/api_common.pyand updated configuration keys for rule limits
Reviewed Changes
Copilot reviewed 18 out of 19 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| setup.py | Deleted legacy setuptools script |
| requirements-backup.txt | Deleted outdated requirements backup |
| pyproject.toml | Introduced modern build config and dependency declarations |
| flowapp/views/*.py | Removed debug prints; added type hints in api_common.py |
| flowapp/models/utils.py | Split FLOWSPEC_MAX_RULES into FLOWSPEC4/FLOWSPEC6 limits |
| flowapp/views/admin.py & templates/pages/orgs.html | Updated limit variables and template references |
| flowapp/templates/layouts/default.html | Bumped Bootstrap to 5.3.3 |
| flowapp/static/js/* | Removed unused JS sources |
| README.md | Bumped version and updated changelog entry |
| .github/workflows/python-app.yml | Switched CI to install editable package with dev deps |
Comments suppressed due to low confidence (5)
README.md:62
- The changelog entry mentions setup.py reading dependencies, but setup.py was removed and dependency management now uses pyproject.toml. Please update this line to accurately reflect the migration to pyproject.toml.
- 1.1.2 - minor security updates (removed unused JS files), setup.py now reads dependencies from requirements.txt
flowapp/views/api_common.py:63
- There's a typo in the docstring: 'loged' should be 'logged'.
Generate API Key for the logged user using PyJWT
flowapp/views/api_common.py:166
- The signature declares a return type of Tuple[Response, int], but the successful branch returns just
jsonify(actions)(Response only). Consider adding an explicit status code or adjusting the annotation.
def all_actions(current_user: Dict[str, Any]) -> Tuple[Response, int]:
flowapp/views/api_common.py:180
- Similar to
all_actions, this function is annotated to return a Tuple but the success path omits an explicit status code. Align the implementation with its annotation.
def all_communities(current_user: Dict[str, Any]) -> Tuple[Response, int]:
flowapp/views/api_common.py:393
- [nitpick] The variable
prefered_tfis misspelled; consider renaming it topreferred_tffor clarity and consistency.
prefered_tf: str = request.args.get(TIME_FORMAT_ARG) if request.args.get(TIME_FORMAT_ARG) else ""
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
version 1.1.2 with minor bug fixes and improved security (removed unused JS files)