Skip to content
Snippets Groups Projects
Commit 6f06f83a authored by Fawwaz Anugrah Wiradhika Dharmasatya's avatar Fawwaz Anugrah Wiradhika Dharmasatya
Browse files

feat: handle class method execption in module

parent bdbebc2d
Branches
No related merge requests found
......@@ -53,7 +53,11 @@ class FileReader:
# parent = parent.parent.parent
# Kasih keterangan tambahan ke konteks modul/fungsi yang merupakan parent fungsi ini.
for route in project_info.route_class:
if route.location==file and (CFG.is_node_equal(route.cfg.ast,parent)):
tmp_parent = parent
if tmp_parent.type=='class_definition' and route.type=='module':
while tmp_parent.type != 'module':
tmp_parent = tmp_parent.parent
if route.location==file and (CFG.is_node_equal(route.cfg.ast,tmp_parent)):
route.context.append(f"Exempt::{curr_node.name.split('(')[0]}")
elif("@ACL" in annotation):
# Ini kelas acl
......
from flask import Blueprint, render_template, request, flash, jsonify,abort
# @ACL(login_required)
# @ACL(login_required)
from flask_login import login_required, current_user
from .models import Note,Log
from .db import db
import json
from lib.RoleCheck import RoleCheck
views = Blueprint('views', __name__)
# @Routes
views = Blueprint('views', __name__)
class Views():
# @NoCheck
# @NoCheck
def __init__(self) -> None:
pass
@views.route('/add', methods=['POST'])
......
- Per NoCheck an belum dites
function
function (V)
class:
- function
- function (V)
module:
- function
- class (!)
- class > function
\ No newline at end of file
- function (V)
- class (V)
- class > function (V)
routes kena nocheck?
default gak cek __init__
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment