project_name string | class_name string | class_modifiers string | class_implements int64 | class_extends int64 | function_name string | function_body string | cyclomatic_complexity int64 | NLOC int64 | num_parameter int64 | num_token int64 | num_variable int64 | start_line int64 | end_line int64 | function_index int64 | function_params string | function_variable string | function_return_type string | function_body_line_type string | function_num_functions int64 | function_num_lines int64 | outgoing_function_count int64 | outgoing_function_names string | incoming_function_count int64 | incoming_function_names string | lexical_representation string |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
maxmind_minfraud-api-python | TestCreditCard | public | 0 | 1 | test_bank_name | def test_bank_name(self) -> None:self.check_transaction_str_type("credit_card", "bank_name") | 1 | 2 | 1 | 15 | 0 | 194 | 195 | 194 | self | [] | None | {"Expr": 1} | 1 | 2 | 1 | ["self.check_transaction_str_type"] | 0 | [] | The function (test_bank_name) defined within the public class called TestCreditCard, that inherit another class.The function start at line 194 and ends at 195. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 fun... |
maxmind_minfraud-api-python | TestCreditCard | public | 0 | 1 | test_bank_phone_number | def test_bank_phone_number(self) -> None:self.check_transaction_str_type("credit_card", "bank_phone_number") | 1 | 2 | 1 | 15 | 0 | 197 | 198 | 197 | self | [] | None | {"Expr": 1} | 1 | 2 | 1 | ["self.check_transaction_str_type"] | 0 | [] | The function (test_bank_phone_number) defined within the public class called TestCreditCard, that inherit another class.The function start at line 197 and ends at 198. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare... |
maxmind_minfraud-api-python | AddressBase | public | 0 | 1 | test_phone_country_code | def test_phone_country_code(self) -> None:for code in (1, "1", "2341"):self.check_transaction({"credit_card": {"bank_phone_country_code": code}})for invalid in ("", "12345", "U"):self.check_invalid_transaction({"credit_card": {"bank_phone_country_code": invalid}},) | 3 | 7 | 1 | 58 | 0 | 200 | 206 | 200 | self | [] | None | {"Expr": 2, "For": 2} | 2 | 5 | 2 | ["self.check_transaction", "self.check_invalid_transaction"] | 0 | [] | The function (test_phone_country_code) defined within the public class called AddressBase, that inherit another class.The function start at line 200 and ends at 206. It contains 7 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares ... |
maxmind_minfraud-api-python | TestCreditCard | public | 0 | 1 | test_avs_and_cvv | def test_avs_and_cvv(self) -> None:for key in ("avs_result", "cvv_result"):for code in ("1", "A"):self.check_transaction({"credit_card": {key: code}})for invalid in ("", "12"):self.check_invalid_transaction({"credit_card": {"credit_card": invalid}},) | 4 | 8 | 1 | 63 | 0 | 208 | 215 | 208 | self | [] | None | {"Expr": 2, "For": 3} | 2 | 8 | 2 | ["self.check_transaction", "self.check_invalid_transaction"] | 0 | [] | The function (test_avs_and_cvv) defined within the public class called TestCreditCard, that inherit another class.The function start at line 208 and ends at 215. It contains 8 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value. It declares 2.0 ... |
maxmind_minfraud-api-python | TestCreditCard | public | 0 | 1 | test_token | def test_token(self) -> None:for token in ("123456abc1245", "\x21", "1" * 20):self.check_transaction({"credit_card": {"token": token}})for invalid in ("\x20", "123456", "x" * 256):self.check_invalid_transaction({"credit_card": {"token": invalid}}) | 3 | 5 | 1 | 61 | 0 | 217 | 221 | 217 | self | [] | None | {"Expr": 2, "For": 2} | 2 | 5 | 2 | ["self.check_transaction", "self.check_invalid_transaction"] | 0 | [] | The function (test_token) defined within the public class called TestCreditCard, that inherit another class.The function start at line 217 and ends at 221. It contains 5 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 2.0 functi... |
maxmind_minfraud-api-python | TestCreditCard | public | 0 | 1 | test_was_3d_secure_successful | def test_was_3d_secure_successful(self) -> None:self.check_bool("credit_card", "was_3d_secure_successful") | 1 | 2 | 1 | 15 | 0 | 223 | 224 | 223 | self | [] | None | {"Expr": 1} | 1 | 2 | 1 | ["self.check_bool"] | 0 | [] | The function (test_was_3d_secure_successful) defined within the public class called TestCreditCard, that inherit another class.The function start at line 223 and ends at 224. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It ... |
maxmind_minfraud-api-python | TestCustomInputs | public | 0 | 1 | test_valid_inputs | def test_valid_inputs(self) -> None:self.check_transaction({"custom_inputs": {"string_input_1": "test string","int_input": 19,"float_input": 3.2,"bool_input": True,},},) | 1 | 11 | 1 | 38 | 0 | 228 | 238 | 228 | self | [] | None | {"Expr": 1} | 1 | 11 | 1 | ["self.check_transaction"] | 0 | [] | The function (test_valid_inputs) defined within the public class called TestCustomInputs, that inherit another class.The function start at line 228 and ends at 238. It contains 11 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1... |
maxmind_minfraud-api-python | TestCustomInputs | public | 0 | 1 | test_invalid | def test_invalid(self) -> None:for invalid in ({"InvalidKey": 1},{"too_long": "x" * 256},{"has_newline": "test\n"},{"too_big": 1e13},{"too_small": -1e13},{"too_big_float": 1e13},):self.check_invalid_transaction({"custom_inputs": invalid}) | 2 | 10 | 1 | 62 | 0 | 240 | 249 | 240 | self | [] | None | {"Expr": 1, "For": 1} | 1 | 10 | 1 | ["self.check_invalid_transaction"] | 0 | [] | The function (test_invalid) defined within the public class called TestCustomInputs, that inherit another class.The function start at line 240 and ends at 249. It contains 10 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declare 1.0 fu... |
maxmind_minfraud-api-python | TestDevice | public | 0 | 1 | test_ip_address | def test_ip_address(self) -> None:for ip in ("1.2.3.4", "2001:db8:0:0:1:0:0:1", "::FFFF:1.2.3.4"):self.check_transaction({"device": {"ip_address": ip}})for invalid in ("1.2.3.", "299.1.1.1", "::AF123"):self.check_invalid_transaction({"device": {"ip_address": invalid}}) | 3 | 5 | 1 | 57 | 0 | 253 | 257 | 253 | self | [] | None | {"Expr": 2, "For": 2} | 2 | 5 | 2 | ["self.check_transaction", "self.check_invalid_transaction"] | 0 | [] | The function (test_ip_address) defined within the public class called TestDevice, that inherit another class.The function start at line 253 and ends at 257. It contains 5 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 2.0 funct... |
maxmind_minfraud-api-python | TestDevice | public | 0 | 1 | test_missing_ip | def test_missing_ip(self) -> None:validate_transaction({"device": {}})validate_transaction({"device": {"user_agent": "foo",},},) | 1 | 9 | 1 | 31 | 0 | 259 | 267 | 259 | self | [] | None | {"Expr": 2} | 2 | 9 | 2 | ["validate_transaction", "validate_transaction"] | 0 | [] | The function (test_missing_ip) defined within the public class called TestDevice, that inherit another class.The function start at line 259 and ends at 267. It contains 9 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 funct... |
maxmind_minfraud-api-python | TestDevice | public | 0 | 1 | test_missing_device | def test_missing_device(self) -> None:validate_transaction({}) | 1 | 2 | 1 | 12 | 0 | 269 | 270 | 269 | self | [] | None | {"Expr": 1} | 1 | 2 | 1 | ["validate_transaction"] | 0 | [] | The function (test_missing_device) defined within the public class called TestDevice, that inherit another class.The function start at line 269 and ends at 270. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 fu... |
maxmind_minfraud-api-python | TestDevice | public | 0 | 1 | test_user_agent | def test_user_agent(self) -> None:self.check_transaction_str_type("device", "user_agent") | 1 | 2 | 1 | 15 | 0 | 272 | 273 | 272 | self | [] | None | {"Expr": 1} | 1 | 2 | 1 | ["self.check_transaction_str_type"] | 0 | [] | The function (test_user_agent) defined within the public class called TestDevice, that inherit another class.The function start at line 272 and ends at 273. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 functi... |
maxmind_minfraud-api-python | TestDevice | public | 0 | 1 | test_accept_language | def test_accept_language(self) -> None:self.check_transaction_str_type("device", "accept_language") | 1 | 2 | 1 | 15 | 0 | 275 | 276 | 275 | self | [] | None | {"Expr": 1} | 1 | 2 | 1 | ["self.check_transaction_str_type"] | 0 | [] | The function (test_accept_language) defined within the public class called TestDevice, that inherit another class.The function start at line 275 and ends at 276. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 f... |
maxmind_minfraud-api-python | TestDevice | public | 0 | 1 | test_session_id | def test_session_id(self) -> None:self.check_transaction_str_type("device", "session_id") | 1 | 2 | 1 | 15 | 0 | 278 | 279 | 278 | self | [] | None | {"Expr": 1} | 1 | 2 | 1 | ["self.check_transaction_str_type"] | 0 | [] | The function (test_session_id) defined within the public class called TestDevice, that inherit another class.The function start at line 278 and ends at 279. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 functi... |
maxmind_minfraud-api-python | TestDevice | public | 0 | 1 | test_session_age | def test_session_age(self) -> None:for valid in (3600, 0, 25.5):self.check_transaction({"device": {"ip_address": "4.4.4.4", "session_age": valid}},)for invalid in ("foo", -1):self.check_invalid_transaction({"device": {"ip_address": "4.4.4.4", "session_age": invalid}},) | 3 | 9 | 1 | 68 | 0 | 281 | 289 | 281 | self | [] | None | {"Expr": 2, "For": 2} | 2 | 9 | 2 | ["self.check_transaction", "self.check_invalid_transaction"] | 0 | [] | The function (test_session_age) defined within the public class called TestDevice, that inherit another class.The function start at line 281 and ends at 289. It contains 9 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 2.0 func... |
maxmind_minfraud-api-python | TestEmail | public | 0 | 1 | test_address | def test_address(self) -> None:for good in ("test@maxmind.com", "977577b140bfb7c516e4746204fbdb01"):self.check_transaction({"email": {"address": good}})for bad in ("not.email","977577b140bfb7c516e4746204fbdb0","977577b140bfb7c516e4746204fbdb012",):self.check_invalid_transaction({"email": {"address": bad}}) | 3 | 9 | 1 | 56 | 0 | 293 | 301 | 293 | self | [] | None | {"Expr": 2, "For": 2} | 2 | 9 | 2 | ["self.check_transaction", "self.check_invalid_transaction"] | 0 | [] | The function (test_address) defined within the public class called TestEmail, that inherit another class.The function start at line 293 and ends at 301. It contains 9 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 2.0 functions... |
maxmind_minfraud-api-python | TestEmail | public | 0 | 1 | test_domain | def test_domain(self) -> None:for good in ("maxmind.com", "www.bbc.co.uk"):self.check_transaction({"email": {"domain": good}})for bad in ("bad ", " bad.com"):self.check_invalid_transaction({"email": {"domain": bad}}) | 3 | 5 | 1 | 53 | 0 | 303 | 307 | 303 | self | [] | None | {"Expr": 2, "For": 2} | 2 | 5 | 2 | ["self.check_transaction", "self.check_invalid_transaction"] | 0 | [] | The function (test_domain) defined within the public class called TestEmail, that inherit another class.The function start at line 303 and ends at 307. It contains 5 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 2.0 functions,... |
maxmind_minfraud-api-python | TestEvent | public | 0 | 1 | test_party | def test_party(self) -> None:for good in ("agent", "customer"):self.check_transaction({"event": {"party": good}})for bad in ("bad", 1, ""):self.check_invalid_transaction({"event": {"party": bad}}) | 3 | 5 | 1 | 55 | 0 | 311 | 315 | 311 | self | [] | None | {"Expr": 2, "For": 2} | 2 | 5 | 2 | ["self.check_transaction", "self.check_invalid_transaction"] | 0 | [] | The function (test_party) defined within the public class called TestEvent, that inherit another class.The function start at line 311 and ends at 315. It contains 5 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 2.0 functions, ... |
maxmind_minfraud-api-python | TestEvent | public | 0 | 1 | test_transaction | def test_transaction(self) -> None:self.check_transaction_str_type("event", "transaction_id") | 1 | 2 | 1 | 15 | 0 | 317 | 318 | 317 | self | [] | None | {"Expr": 1} | 1 | 2 | 1 | ["self.check_transaction_str_type"] | 0 | [] | The function (test_transaction) defined within the public class called TestEvent, that inherit another class.The function start at line 317 and ends at 318. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 functi... |
maxmind_minfraud-api-python | TestEvent | public | 0 | 1 | test_shop_id | def test_shop_id(self) -> None:self.check_transaction_str_type("event", "shop_id") | 1 | 2 | 1 | 15 | 0 | 320 | 321 | 320 | self | [] | None | {"Expr": 1} | 1 | 2 | 1 | ["self.check_transaction_str_type"] | 0 | [] | The function (test_shop_id) defined within the public class called TestEvent, that inherit another class.The function start at line 320 and ends at 321. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, ... |
maxmind_minfraud-api-python | TestEvent | public | 0 | 1 | test_time | def test_time(self) -> None:for good in ("2015-05-08T16:07:56+00:00", "2015-05-08T16:07:56Z"):self.check_transaction({"event": {"time": good}})for bad in ("2015-05-08T16:07:56", "2015-05-08 16:07:56Z"):self.check_invalid_transaction({"event": {"time": bad}}) | 3 | 5 | 1 | 53 | 0 | 323 | 327 | 323 | self | [] | None | {"Expr": 2, "For": 2} | 2 | 5 | 2 | ["self.check_transaction", "self.check_invalid_transaction"] | 0 | [] | The function (test_time) defined within the public class called TestEvent, that inherit another class.The function start at line 323 and ends at 327. It contains 5 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 2.0 functions, a... |
maxmind_minfraud-api-python | TestEvent | public | 0 | 1 | test_type | def test_type(self) -> None:for good in ("account_creation","account_login","credit_application","email_change","fund_transfer","password_reset","payout_change","purchase","recurring_purchase","referral","survey",):self.check_transaction({"event": {"type": good}})for bad in ("bad", 1, ""):self.check_invalid_transaction... | 3 | 17 | 1 | 74 | 0 | 329 | 345 | 329 | self | [] | None | {"Expr": 2, "For": 2} | 2 | 17 | 2 | ["self.check_transaction", "self.check_invalid_transaction"] | 5 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.77620428_lqhuang_mode_ng.tests.unit.test_locals_py.test_AsyncGeneratorProxy.test_type", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.77620428_lqhuang_mode_ng.tests.unit.test_locals_py.test_AsyncIteratorProxy.test_t... | The function (test_type) defined within the public class called TestEvent, that inherit another class.The function start at line 329 and ends at 345. It contains 17 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 2.0 functions, ... |
maxmind_minfraud-api-python | TestOrder | public | 0 | 1 | test_amount | def test_amount(self) -> None:self.check_positive_number(lambda v: {"order": {"amount": v}}) | 1 | 2 | 1 | 24 | 0 | 349 | 350 | 349 | self | [] | None | {"Expr": 1} | 1 | 2 | 1 | ["self.check_positive_number"] | 0 | [] | The function (test_amount) defined within the public class called TestOrder, that inherit another class.The function start at line 349 and ends at 350. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, a... |
maxmind_minfraud-api-python | TestOrder | public | 0 | 1 | test_currency | def test_currency(self) -> None:for good in ("USD", "GBP"):self.check_transaction({"order": {"currency": good}})for bad in ("US", "US1", "USDD", "usd"):self.check_invalid_transaction({"order": {"currency": bad}}) | 3 | 5 | 1 | 57 | 0 | 352 | 356 | 352 | self | [] | None | {"Expr": 2, "For": 2} | 2 | 5 | 2 | ["self.check_transaction", "self.check_invalid_transaction"] | 0 | [] | The function (test_currency) defined within the public class called TestOrder, that inherit another class.The function start at line 352 and ends at 356. It contains 5 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 2.0 function... |
maxmind_minfraud-api-python | TestOrder | public | 0 | 1 | test_discount_code | def test_discount_code(self) -> None:self.check_transaction_str_type("order", "discount_code") | 1 | 2 | 1 | 15 | 0 | 358 | 359 | 358 | self | [] | None | {"Expr": 1} | 1 | 2 | 1 | ["self.check_transaction_str_type"] | 0 | [] | The function (test_discount_code) defined within the public class called TestOrder, that inherit another class.The function start at line 358 and ends at 359. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 func... |
maxmind_minfraud-api-python | TestOrder | public | 0 | 1 | test_affiliate_id | def test_affiliate_id(self) -> None:self.check_transaction_str_type("order", "affiliate_id") | 1 | 2 | 1 | 15 | 0 | 361 | 362 | 361 | self | [] | None | {"Expr": 1} | 1 | 2 | 1 | ["self.check_transaction_str_type"] | 0 | [] | The function (test_affiliate_id) defined within the public class called TestOrder, that inherit another class.The function start at line 361 and ends at 362. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 funct... |
maxmind_minfraud-api-python | TestOrder | public | 0 | 1 | test_subaffiliate_id | def test_subaffiliate_id(self) -> None:self.check_transaction_str_type("order", "subaffiliate_id") | 1 | 2 | 1 | 15 | 0 | 364 | 365 | 364 | self | [] | None | {"Expr": 1} | 1 | 2 | 1 | ["self.check_transaction_str_type"] | 0 | [] | The function (test_subaffiliate_id) defined within the public class called TestOrder, that inherit another class.The function start at line 364 and ends at 365. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 fu... |
maxmind_minfraud-api-python | TestOrder | public | 0 | 1 | test_is_gift | def test_is_gift(self) -> None:self.check_bool("order", "is_gift") | 1 | 2 | 1 | 15 | 0 | 367 | 368 | 367 | self | [] | None | {"Expr": 1} | 1 | 2 | 1 | ["self.check_bool"] | 0 | [] | The function (test_is_gift) defined within the public class called TestOrder, that inherit another class.The function start at line 367 and ends at 368. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, ... |
maxmind_minfraud-api-python | TestOrder | public | 0 | 1 | test_has_gift_message | def test_has_gift_message(self) -> None:self.check_bool("order", "has_gift_message") | 1 | 2 | 1 | 15 | 0 | 370 | 371 | 370 | self | [] | None | {"Expr": 1} | 1 | 2 | 1 | ["self.check_bool"] | 0 | [] | The function (test_has_gift_message) defined within the public class called TestOrder, that inherit another class.The function start at line 370 and ends at 371. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 f... |
maxmind_minfraud-api-python | TestOrder | public | 0 | 1 | test_referrer_uri | def test_referrer_uri(self) -> None:for good in ("http://www.mm.com/fadsf", "https://x.org/"):self.check_transaction({"order": {"referrer_uri": good}})for bad in ("ftp://a.com/", "www.mm.com"):self.check_invalid_transaction({"order": {"referrer_uri": bad}}) | 3 | 5 | 1 | 53 | 0 | 373 | 377 | 373 | self | [] | None | {"Expr": 2, "For": 2} | 2 | 5 | 2 | ["self.check_transaction", "self.check_invalid_transaction"] | 0 | [] | The function (test_referrer_uri) defined within the public class called TestOrder, that inherit another class.The function start at line 373 and ends at 377. It contains 5 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 2.0 func... |
maxmind_minfraud-api-python | TestPayment | public | 0 | 1 | test_method | def test_method(self) -> None:for good in ("bank_debit","bank_redirect","bank_transfer","buy_now_pay_later","card","crypto","digital_wallet","gift_card","real_time_payment","rewards",):self.check_transaction({"payment": {"method": good}})for bad in ("bad", 1, ""):self.check_invalid_transaction({"payment": {"method": ba... | 3 | 16 | 1 | 72 | 0 | 381 | 396 | 381 | self | [] | None | {"Expr": 2, "For": 2} | 2 | 16 | 2 | ["self.check_transaction", "self.check_invalid_transaction"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94634754_pytorch_executorch.exir.backend.test.test_backends_lifted_py.vary_segments", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94634754_pytorch_executorch.exir.backend.test.test_backends_py.vary_segments"] | The function (test_method) defined within the public class called TestPayment, that inherit another class.The function start at line 381 and ends at 396. It contains 16 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 2.0 functio... |
maxmind_minfraud-api-python | TestPayment | public | 0 | 1 | test_processor | def test_processor(self) -> None:for good in ("adyen", "stripe"):self.check_transaction({"payment": {"processor": good}})for bad in ("notvalid", " stripe"):self.check_invalid_transaction({"payment": {"processor": bad}}) | 3 | 5 | 1 | 53 | 0 | 398 | 402 | 398 | self | [] | None | {"Expr": 2, "For": 2} | 2 | 5 | 2 | ["self.check_transaction", "self.check_invalid_transaction"] | 0 | [] | The function (test_processor) defined within the public class called TestPayment, that inherit another class.The function start at line 398 and ends at 402. It contains 5 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 2.0 funct... |
maxmind_minfraud-api-python | TestPayment | public | 0 | 1 | test_was_authorized | def test_was_authorized(self) -> None:self.check_bool("payment", "was_authorized") | 1 | 2 | 1 | 15 | 0 | 404 | 405 | 404 | self | [] | None | {"Expr": 1} | 1 | 2 | 1 | ["self.check_bool"] | 0 | [] | The function (test_was_authorized) defined within the public class called TestPayment, that inherit another class.The function start at line 404 and ends at 405. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 f... |
maxmind_minfraud-api-python | TestPayment | public | 0 | 1 | test_decline_code | def test_decline_code(self) -> None:self.check_transaction_str_type("payment", "decline_code") | 1 | 2 | 1 | 15 | 0 | 407 | 408 | 407 | self | [] | None | {"Expr": 1} | 1 | 2 | 1 | ["self.check_transaction_str_type"] | 0 | [] | The function (test_decline_code) defined within the public class called TestPayment, that inherit another class.The function start at line 407 and ends at 408. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 fun... |
maxmind_minfraud-api-python | TestShoppingCart | public | 0 | 1 | test_category | def test_category(self) -> None:self.check_transaction({"shopping_cart": [{"category": "cat"}]}) | 1 | 2 | 1 | 23 | 0 | 412 | 413 | 412 | self | [] | None | {"Expr": 1} | 1 | 2 | 1 | ["self.check_transaction"] | 0 | [] | The function (test_category) defined within the public class called TestShoppingCart, that inherit another class.The function start at line 412 and ends at 413. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 fu... |
maxmind_minfraud-api-python | TestShoppingCart | public | 0 | 1 | test_item_id | def test_item_id(self) -> None:self.check_transaction({"shopping_cart": [{"item_id": "cat"}]}) | 1 | 2 | 1 | 23 | 0 | 415 | 416 | 415 | self | [] | None | {"Expr": 1} | 1 | 2 | 1 | ["self.check_transaction"] | 0 | [] | The function (test_item_id) defined within the public class called TestShoppingCart, that inherit another class.The function start at line 415 and ends at 416. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 fun... |
maxmind_minfraud-api-python | TestOrder | public | 0 | 1 | test_amount | def test_amount(self) -> None:self.check_positive_number(lambda v: {"shopping_cart": [{"price": v}]}) | 1 | 2 | 1 | 26 | 0 | 418 | 419 | 418 | self | [] | None | {"Expr": 1} | 1 | 2 | 1 | ["self.check_positive_number"] | 0 | [] | The function (test_amount) defined within the public class called TestOrder, that inherit another class.The function start at line 418 and ends at 419. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, a... |
maxmind_minfraud-api-python | TestShoppingCart | public | 0 | 1 | test_quantity | def test_quantity(self) -> None:for good in (1, 1000):self.check_transaction({"shopping_cart": [{"quantity": good}]})for bad in (1.1, -1, 0):self.check_invalid_transaction({"shopping_cart": [{"quantity": bad}]}) | 3 | 5 | 1 | 62 | 0 | 421 | 425 | 421 | self | [] | None | {"Expr": 2, "For": 2} | 2 | 5 | 2 | ["self.check_transaction", "self.check_invalid_transaction"] | 0 | [] | The function (test_quantity) defined within the public class called TestShoppingCart, that inherit another class.The function start at line 421 and ends at 425. It contains 5 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 2.0 f... |
maxmind_minfraud-api-python | TestDevice | public | 0 | 1 | test_ip_address | def test_ip_address(self) -> None:for good in ("182.193.2.1", "a74:777f:3acd:57a0:4e7e:e999:7fe6:1b5b"):self.check_report({"ip_address": good})for bad in ("1.2.3.", "299.1.1.1", "::AF123", "", None):self.check_invalid_report({"ip_address": bad}) | 3 | 5 | 1 | 51 | 0 | 429 | 433 | 429 | self | [] | None | {"Expr": 2, "For": 2} | 2 | 5 | 2 | ["self.check_transaction", "self.check_invalid_transaction"] | 0 | [] | The function (test_ip_address) defined within the public class called TestDevice, that inherit another class.The function start at line 429 and ends at 433. It contains 5 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 2.0 funct... |
maxmind_minfraud-api-python | TestReport | public | 0 | 1 | test_maxmind_id | def test_maxmind_id(self) -> None:for good in ("12345678", "abcdefgh"):self.check_report({"maxmind_id": good})for bad in ("1234567", "123456789", "", None):self.check_invalid_report({"maxmind_id": bad}) | 3 | 5 | 1 | 49 | 0 | 435 | 439 | 435 | self | [] | None | {"Expr": 2, "For": 2} | 2 | 5 | 2 | ["self.check_report", "self.check_invalid_report"] | 0 | [] | The function (test_maxmind_id) defined within the public class called TestReport, that inherit another class.The function start at line 435 and ends at 439. It contains 5 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 2.0 funct... |
maxmind_minfraud-api-python | TestReport | public | 0 | 1 | test_minfraud_id | def test_minfraud_id(self) -> None:for good in ("12345678-1234-1234-1234-123456789012","1234-5678-1234-1234-1234-1234-5678-9012","12345678901234567890123456789012",):self.check_report({"minfraud_id": good})for bad in ("1234567812341234123412345678901","12345678-123412341234-12345678901","12345678-1234-1234-1234-1234567... | 3 | 16 | 1 | 57 | 0 | 441 | 456 | 441 | self | [] | None | {"Expr": 2, "For": 2} | 2 | 16 | 2 | ["self.check_report", "self.check_invalid_report"] | 0 | [] | The function (test_minfraud_id) defined within the public class called TestReport, that inherit another class.The function start at line 441 and ends at 456. It contains 16 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 2.0 fun... |
maxmind_minfraud-api-python | AddressBase | public | 0 | 1 | test_strings | def test_strings(self) -> None:for key in ("chargeback_code","notes","transaction_id",):self.check_report_str_type(key) | 2 | 7 | 1 | 25 | 0 | 458 | 464 | 458 | self | [] | None | {"Expr": 1, "For": 1} | 1 | 12 | 1 | ["self.check_transaction_str_type"] | 0 | [] | The function (test_strings) defined within the public class called AddressBase, that inherit another class.The function start at line 458 and ends at 464. It contains 7 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declare 1.0 function... |
maxmind_minfraud-api-python | TestReport | public | 0 | 1 | test_tag | def test_tag(self) -> None:for good in ("chargeback", "not_fraud", "spam_or_abuse", "suspected_fraud"):self.check_report({"tag": good})for bad in ("risky_business", "", None):self.check_invalid_report({"tag": bad}) | 3 | 5 | 1 | 51 | 0 | 466 | 470 | 466 | self | [] | None | {"Expr": 2, "For": 2} | 2 | 5 | 2 | ["self.check_report", "self.check_invalid_report"] | 0 | [] | The function (test_tag) defined within the public class called TestReport, that inherit another class.The function start at line 466 and ends at 470. It contains 5 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 2.0 functions, a... |
maxmind_minfraud-api-python | TestReport | public | 0 | 1 | test_report_valid_identifier | def test_report_valid_identifier(self) -> None:self.check_invalid_report_no_setup({"tag": "chargeback"})self.check_report_no_setup({"tag": "chargeback", "ip_address": "1.1.1.1"})self.check_report_no_setup({"tag": "chargeback","minfraud_id": "58fa38d8-4b87-458b-a22b-f00eda1aa20d",},)self.check_report_no_setup({"tag": "c... | 1 | 11 | 1 | 75 | 0 | 472 | 483 | 472 | self | [] | None | {"Expr": 5} | 5 | 12 | 5 | ["self.check_invalid_report_no_setup", "self.check_report_no_setup", "self.check_report_no_setup", "self.check_report_no_setup", "self.check_report_no_setup"] | 0 | [] | The function (test_report_valid_identifier) defined within the public class called TestReport, that inherit another class.The function start at line 472 and ends at 483. It contains 11 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It decl... |
maxmind_minfraud-api-python | BaseTest | public | 0 | 1 | setup_httpserver | def setup_httpserver(self, httpserver: HTTPServer) -> None:self.httpserver = httpserver | 1 | 2 | 2 | 16 | 0 | 39 | 40 | 39 | self,httpserver | [] | None | {"Assign": 1} | 1 | 2 | 1 | ["pytest.fixture"] | 0 | [] | The function (setup_httpserver) defined within the public class called BaseTest, that inherit another class.The function start at line 39 and ends at 40. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [39.0] and does not return any value. It declare 1.0 functi... |
maxmind_minfraud-api-python | BaseTest | public | 0 | 1 | setUp | def setUp(self) -> None:self.client = self.client_class(42,"abcdef123456",host=f"{self.httpserver.host}:{self.httpserver.port}",)test_dir = os.path.join(# noqa: PTH118os.path.dirname(__file__),# noqa: PTH120"data",)with builtins.open(# noqa: PTH123os.path.join(test_dir, self.request_file),# noqa: PTH118encoding="utf-8"... | 1 | 21 | 1 | 123 | 0 | 42 | 63 | 42 | self | [] | None | {"Assign": 5, "With": 2} | 10 | 22 | 10 | ["self.client_class", "os.path.join", "os.path.dirname", "builtins.open", "os.path.join", "file.read", "json.loads", "builtins.open", "os.path.join", "file.read"] | 303 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508200_spiral_project_daybed.daybed.tests.test_backend_py.TestCouchDBBackend.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508200_spiral_project_daybed.daybed.tests.test_backend_py.TestMemoryBackend.setUp"... | The function (setUp) defined within the public class called BaseTest, that inherit another class.The function start at line 42 and ends at 63. It contains 21 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 10.0 functions, It has... |
maxmind_minfraud-api-python | BaseTest | public | 0 | 1 | test_invalid_auth | def test_invalid_auth(self) -> None:for error in ("ACCOUNT_ID_REQUIRED","AUTHORIZATION_INVALID","LICENSE_KEY_REQUIRED","USER_ID_REQUIRED",):with self.assertRaisesRegex(AuthenticationError, "Invalid auth"):self.create_error(text=f'{{"code":"{error}","error":"Invalid auth"}}',status_code=401,) | 2 | 12 | 1 | 45 | 0 | 65 | 76 | 65 | self | [] | None | {"Expr": 1, "For": 1, "With": 1} | 2 | 12 | 2 | ["self.assertRaisesRegex", "self.create_error"] | 0 | [] | The function (test_invalid_auth) defined within the public class called BaseTest, that inherit another class.The function start at line 65 and ends at 76. It contains 12 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 2.0 functi... |
maxmind_minfraud-api-python | BaseTest | public | 0 | 1 | test_invalid_request | def test_invalid_request(self) -> None:with self.assertRaisesRegex(InvalidRequestError, "IP invalid"):self.create_error(text='{"code":"IP_ADDRESS_INVALID","error":"IP invalid"}') | 1 | 3 | 1 | 25 | 0 | 78 | 80 | 78 | self | [] | None | {"Expr": 1, "With": 1} | 2 | 3 | 2 | ["self.assertRaisesRegex", "self.create_error"] | 0 | [] | The function (test_invalid_request) defined within the public class called BaseTest, that inherit another class.The function start at line 78 and ends at 80. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 func... |
maxmind_minfraud-api-python | BaseTest | public | 0 | 1 | test_300_error | def test_300_error(self) -> None:with self.assertRaisesRegex(HTTPError,r"Received an unexpected HTTP status \(300\) for",):self.create_error(status_code=300) | 1 | 6 | 1 | 27 | 0 | 82 | 87 | 82 | self | [] | None | {"Expr": 1, "With": 1} | 2 | 6 | 2 | ["self.assertRaisesRegex", "self.create_error"] | 0 | [] | The function (test_300_error) defined within the public class called BaseTest, that inherit another class.The function start at line 82 and ends at 87. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functions,... |
maxmind_minfraud-api-python | BaseTest | public | 0 | 1 | test_permission_required | def test_permission_required(self) -> None:with self.assertRaisesRegex(PermissionRequiredError, "permission"):self.create_error(text='{"code":"PERMISSION_REQUIRED","error":"permission required"}',status_code=403,) | 1 | 6 | 1 | 30 | 0 | 89 | 94 | 89 | self | [] | None | {"Expr": 1, "With": 1} | 2 | 6 | 2 | ["self.assertRaisesRegex", "self.create_error"] | 0 | [] | The function (test_permission_required) defined within the public class called BaseTest, that inherit another class.The function start at line 89 and ends at 94. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 ... |
maxmind_minfraud-api-python | BaseTest | public | 0 | 1 | test_400_with_invalid_json | def test_400_with_invalid_json(self) -> None:with self.assertRaisesRegex(HTTPError,"Received a 400 error but it did not include the expected JSON"" body: b?'?{blah}'?",):self.create_error(text="{blah}") | 1 | 7 | 1 | 27 | 0 | 96 | 102 | 96 | self | [] | None | {"Expr": 1, "With": 1} | 2 | 7 | 2 | ["self.assertRaisesRegex", "self.create_error"] | 0 | [] | The function (test_400_with_invalid_json) defined within the public class called BaseTest, that inherit another class.The function start at line 96 and ends at 102. It contains 7 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2... |
maxmind_minfraud-api-python | BaseTest | public | 0 | 1 | test_400_with_no_body | def test_400_with_no_body(self) -> None:with self.assertRaisesRegex(HTTPError, "Received a 400 error with no body"):self.create_error() | 1 | 3 | 1 | 22 | 0 | 104 | 106 | 104 | self | [] | None | {"Expr": 1, "With": 1} | 2 | 3 | 2 | ["self.assertRaisesRegex", "self.create_error"] | 0 | [] | The function (test_400_with_no_body) defined within the public class called BaseTest, that inherit another class.The function start at line 104 and ends at 106. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 f... |
maxmind_minfraud-api-python | BaseTest | public | 0 | 1 | test_400_with_unexpected_content_type | def test_400_with_unexpected_content_type(self) -> None:with self.assertRaisesRegex(HTTPError,"Received a 400 with the following body: b?'?plain'?",):self.create_error(content_type="text/plain", text="plain") | 1 | 6 | 1 | 30 | 0 | 108 | 113 | 108 | self | [] | None | {"Expr": 1, "With": 1} | 2 | 6 | 2 | ["self.assertRaisesRegex", "self.create_error"] | 0 | [] | The function (test_400_with_unexpected_content_type) defined within the public class called BaseTest, that inherit another class.The function start at line 108 and ends at 113. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. I... |
maxmind_minfraud-api-python | BaseTest | public | 0 | 1 | test_400_without_json_body | def test_400_without_json_body(self) -> None:with self.assertRaisesRegex(HTTPError,"Received a 400 error but it did not include the expected JSON"" body: b?'?plain'?",):self.create_error(text="plain") | 1 | 7 | 1 | 27 | 0 | 115 | 121 | 115 | self | [] | None | {"Expr": 1, "With": 1} | 2 | 7 | 2 | ["self.assertRaisesRegex", "self.create_error"] | 0 | [] | The function (test_400_without_json_body) defined within the public class called BaseTest, that inherit another class.The function start at line 115 and ends at 121. It contains 7 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares ... |
maxmind_minfraud-api-python | BaseTest | public | 0 | 1 | test_400_with_unexpected_json | def test_400_with_unexpected_json(self) -> None:with self.assertRaisesRegex(HTTPError,"Error response contains JSON but it does not specify code or"' error keys: b?\'?{"not":"expected"}\'?',):self.create_error(text='{"not":"expected"}') | 1 | 7 | 1 | 27 | 0 | 123 | 129 | 123 | self | [] | None | {"Expr": 1, "With": 1} | 2 | 7 | 2 | ["self.assertRaisesRegex", "self.create_error"] | 0 | [] | The function (test_400_with_unexpected_json) defined within the public class called BaseTest, that inherit another class.The function start at line 123 and ends at 129. It contains 7 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declar... |
maxmind_minfraud-api-python | BaseTest | public | 0 | 1 | test_500_error | def test_500_error(self) -> None:with self.assertRaisesRegex(HTTPError, r"Received a server error \(500\) for"):self.create_error(status_code=500) | 1 | 3 | 1 | 26 | 0 | 131 | 133 | 131 | self | [] | None | {"Expr": 1, "With": 1} | 2 | 3 | 2 | ["self.assertRaisesRegex", "self.create_error"] | 0 | [] | The function (test_500_error) defined within the public class called BaseTest, that inherit another class.The function start at line 131 and ends at 133. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 function... |
maxmind_minfraud-api-python | BaseTest | public | 0 | 1 | create_error | def create_error(self,status_code: int = 400,text: str = "",content_type: str | None = None,):uri = "/".join((["/minfraud/v2.0", "transactions", "report"]if self.type == "report"else ["/minfraud/v2.0", self.type]),)if content_type is None:content_type = ("application/json"if self.type == "report"else ("application/vnd.... | 4 | 27 | 4 | 124 | 0 | 135 | 161 | 135 | self,status_code,text,content_type | [] | Returns | {"Assign": 2, "Expr": 1, "If": 1, "Return": 1} | 5 | 27 | 5 | ["join", "respond_with_data", "self.httpserver.expect_request", "self.run_client", "getattr"] | 0 | [] | The function (create_error) defined within the public class called BaseTest, that inherit another class.The function start at line 135 and ends at 161. It contains 27 lines of code and it has a cyclomatic complexity of 4. It takes 4 parameters, represented as [135.0], and this function return a value. It declares 5.0 f... |
maxmind_minfraud-api-python | BaseTest | public | 0 | 1 | create_success | def create_success(self,text: str | None = None,client: AsyncClient | Client | None = None,request: dict[str, Any] | None = None,):uri = "/".join((["/minfraud/v2.0", "transactions", "report"]if self.type == "report"else ["/minfraud/v2.0", self.type]),)if request is None:request = self.full_requestresponse = self.respon... | 6 | 28 | 4 | 157 | 0 | 163 | 192 | 163 | self,text,client,request | [] | Returns | {"Assign": 5, "Expr": 1, "If": 2, "Return": 1} | 5 | 30 | 5 | ["join", "respond_with_data", "self.httpserver.expect_request", "self.run_client", "getattr"] | 0 | [] | The function (create_success) defined within the public class called BaseTest, that inherit another class.The function start at line 163 and ends at 192. It contains 28 lines of code and it has a cyclomatic complexity of 6. It takes 4 parameters, represented as [163.0], and this function return a value. It declares 5.0... |
maxmind_minfraud-api-python | BaseTest | public | 0 | 1 | run_client | def run_client(self, v):# noqa: ANN001return v | 1 | 2 | 2 | 9 | 0 | 194 | 195 | 194 | self,v | [] | Returns | {"Return": 1} | 0 | 2 | 0 | [] | 0 | [] | The function (run_client) defined within the public class called BaseTest, that inherit another class.The function start at line 194 and ends at 195. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [194.0], and this function return a value.. |
maxmind_minfraud-api-python | BaseTest | public | 0 | 1 | test_named_constructor_args | def test_named_constructor_args(self) -> None:id = 47key = "1234567890ab"for client in (self.client_class(account_id=id, license_key=key),self.client_class(account_id=id, license_key=key),):self.assertEqual(client._account_id, str(id))# noqa: SLF001self.assertEqual(client._license_key, key)# noqa: SLF001 | 2 | 9 | 1 | 68 | 0 | 197 | 205 | 197 | self | [] | None | {"Assign": 2, "Expr": 2, "For": 1} | 5 | 9 | 5 | ["self.client_class", "self.client_class", "self.assertEqual", "str", "self.assertEqual"] | 0 | [] | The function (test_named_constructor_args) defined within the public class called BaseTest, that inherit another class.The function start at line 197 and ends at 205. It contains 9 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares... |
maxmind_minfraud-api-python | BaseTest | public | 0 | 1 | test_missing_constructor_args | def test_missing_constructor_args(self) -> None:with self.assertRaises(TypeError):self.client_class(license_key="1234567890ab")# type: ignore[call-arg]with self.assertRaises(TypeError):self.client_class("47")# type: ignore[arg-type,call-arg] | 1 | 5 | 1 | 37 | 0 | 207 | 212 | 207 | self | [] | None | {"Expr": 2, "With": 2} | 4 | 6 | 4 | ["self.assertRaises", "self.client_class", "self.assertRaises", "self.client_class"] | 0 | [] | The function (test_missing_constructor_args) defined within the public class called BaseTest, that inherit another class.The function start at line 207 and ends at 212. It contains 5 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declar... |
maxmind_minfraud-api-python | BaseTransactionTest | public | 0 | 1 | has_ip_location | def has_ip_location(self) -> bool:return self.type in ["factors", "insights"] | 1 | 2 | 1 | 17 | 0 | 221 | 222 | 221 | self | [] | bool | {"Return": 1} | 0 | 2 | 0 | [] | 0 | [] | The function (has_ip_location) defined within the public class called BaseTransactionTest, that inherit another class.The function start at line 221 and ends at 222. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
maxmind_minfraud-api-python | BaseTransactionTest | public | 0 | 1 | test_200 | def test_200(self) -> None:model = self.create_success()response = json.loads(self.response)cls = self.clsif self.has_ip_location():cls = cast("Callable", partial(cls, ("en",)))self.assertEqual(cls(**response), model)if self.has_ip_location():self.assertEqual("United Kingdom", model.ip_address.country.name)self.assertE... | 3 | 13 | 1 | 144 | 0 | 224 | 236 | 224 | self | [] | None | {"Assign": 4, "Expr": 6, "If": 2} | 13 | 13 | 13 | ["self.create_success", "json.loads", "self.has_ip_location", "cast", "partial", "self.assertEqual", "cls", "self.has_ip_location", "self.assertEqual", "self.assertEqual", "self.assertEqual", "self.assertEqual", "self.assertEqual"] | 0 | [] | The function (test_200) defined within the public class called BaseTransactionTest, that inherit another class.The function start at line 224 and ends at 236. It contains 13 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 13.0 f... |
maxmind_minfraud-api-python | BaseTransactionTest | public | 0 | 1 | test_200_on_request_with_nones | def test_200_on_request_with_nones(self) -> None:model = self.create_success(request={"device": {"ip_address": "152.216.7.110", "accept_language": None},"event": {"shop_id": None},"shopping_cart": [{"category": None,"quantity": 2,},None,],},)self.assertEqual(0.01, model.risk_score) | 1 | 15 | 1 | 69 | 0 | 238 | 252 | 238 | self | [] | None | {"Assign": 1, "Expr": 1} | 2 | 15 | 2 | ["self.create_success", "self.assertEqual"] | 0 | [] | The function (test_200_on_request_with_nones) defined within the public class called BaseTransactionTest, that inherit another class.The function start at line 238 and ends at 252. It contains 15 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any val... |
maxmind_minfraud-api-python | BaseTransactionTest | public | 0 | 1 | test_200_with_email_hashing | def test_200_with_email_hashing(self) -> None:uri = f"/minfraud/v2.0/{self.type}"self.httpserver.expect_request(uri,method="POST",json={"email": {"address": "977577b140bfb7c516e4746204fbdb01","domain": "maxmind.com",},},).respond_with_data(self.response,content_type=(f"application/vnd.maxmind.com-minfraud-{self.type}+j... | 1 | 21 | 1 | 95 | 0 | 254 | 275 | 254 | self | [] | None | {"Assign": 2, "Expr": 2} | 4 | 22 | 4 | ["respond_with_data", "self.httpserver.expect_request", "self.run_client", "getattr"] | 0 | [] | The function (test_200_with_email_hashing) defined within the public class called BaseTransactionTest, that inherit another class.The function start at line 254 and ends at 275. It contains 21 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.... |
maxmind_minfraud-api-python | BaseTransactionTest | public | 0 | 1 | test_200_with_locales | def test_200_with_locales(self) -> None:locales = ("fr",)client = self.client_class(42,"abcdef123456",locales=locales,host=f"{self.httpserver.host}:{self.httpserver.port}",)model = self.create_success(client=client)response = json.loads(self.response)cls = self.clsif self.has_ip_location():cls = partial(cls, locales)se... | 3 | 17 | 1 | 120 | 0 | 279 | 295 | 279 | self | [] | None | {"Assign": 6, "Expr": 3, "If": 2} | 10 | 17 | 10 | ["self.client_class", "self.create_success", "json.loads", "self.has_ip_location", "partial", "self.assertEqual", "cls", "self.has_ip_location", "self.assertEqual", "self.assertEqual"] | 0 | [] | The function (test_200_with_locales) defined within the public class called BaseTransactionTest, that inherit another class.The function start at line 279 and ends at 295. It contains 17 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It de... |
maxmind_minfraud-api-python | BaseTransactionTest | public | 0 | 1 | test_200_with_reserved_ip_warning | def test_200_with_reserved_ip_warning(self) -> None:model = self.create_success("""{"funds_remaining": 10.00,"queries_remaining": 1000,"risk_score": 12,"id": "0e52f5ac-7690-4780-a939-173cb13ecd75","warnings": [{"code": "IP_ADDRESS_RESERVED","warning":"The IP address supplied is in a reserved network.","input_pointer": ... | 1 | 20 | 1 | 26 | 0 | 297 | 317 | 297 | self | [] | None | {"Assign": 1, "Expr": 1} | 2 | 21 | 2 | ["self.create_success", "self.assertEqual"] | 0 | [] | The function (test_200_with_reserved_ip_warning) defined within the public class called BaseTransactionTest, that inherit another class.The function start at line 297 and ends at 317. It contains 20 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any ... |
maxmind_minfraud-api-python | BaseTransactionTest | public | 0 | 1 | test_200_with_no_risk_score_reasons | def test_200_with_no_risk_score_reasons(self) -> None:if "risk_score_reasons" not in self.response:returnresponse = json.loads(self.response)del response["risk_score_reasons"]model = self.create_success(text=json.dumps(response))self.assertEqual([], model.risk_score_reasons) | 2 | 7 | 1 | 57 | 0 | 319 | 326 | 319 | self | [] | None | {"Assign": 2, "Expr": 1, "If": 1, "Return": 1} | 4 | 8 | 4 | ["json.loads", "self.create_success", "json.dumps", "self.assertEqual"] | 0 | [] | The function (test_200_with_no_risk_score_reasons) defined within the public class called BaseTransactionTest, that inherit another class.The function start at line 319 and ends at 326. It contains 7 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any... |
maxmind_minfraud-api-python | BaseTransactionTest | public | 0 | 1 | test_200_with_no_body | def test_200_with_no_body(self) -> None:with self.assertRaisesRegex(MinFraudError,"Received a 200 response but could not decode the response as JSON: b?'?'?",):self.create_success(text="") | 1 | 6 | 1 | 26 | 0 | 328 | 333 | 328 | self | [] | None | {"Expr": 1, "With": 1} | 2 | 6 | 2 | ["self.assertRaisesRegex", "self.create_success"] | 0 | [] | The function (test_200_with_no_body) defined within the public class called BaseTransactionTest, that inherit another class.The function start at line 328 and ends at 333. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It dec... |
maxmind_minfraud-api-python | BaseTransactionTest | public | 0 | 1 | test_200_with_invalid_json | def test_200_with_invalid_json(self) -> None:with self.assertRaisesRegex(MinFraudError,"Received a 200 response but could not decode the response as"" JSON: b?'?{'?",):self.create_success(text="{") | 1 | 7 | 1 | 27 | 0 | 335 | 341 | 335 | self | [] | None | {"Expr": 1, "With": 1} | 2 | 7 | 2 | ["self.assertRaisesRegex", "self.create_success"] | 0 | [] | The function (test_200_with_invalid_json) defined within the public class called BaseTransactionTest, that inherit another class.The function start at line 335 and ends at 341. It contains 7 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. I... |
maxmind_minfraud-api-python | BaseTransactionTest | public | 0 | 1 | test_insufficient_funds | def test_insufficient_funds(self) -> None:with self.assertRaisesRegex(InsufficientFundsError, "out of funds"):self.create_error(text='{"code":"INSUFFICIENT_FUNDS","error":"out of funds"}',status_code=402,) | 1 | 6 | 1 | 30 | 0 | 343 | 348 | 343 | self | [] | None | {"Expr": 1, "With": 1} | 2 | 6 | 2 | ["self.assertRaisesRegex", "self.create_error"] | 0 | [] | The function (test_insufficient_funds) defined within the public class called BaseTransactionTest, that inherit another class.The function start at line 343 and ends at 348. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It d... |
maxmind_minfraud-api-python | TestReportTransaction | public | 0 | 1 | test_204 | def test_204(self) -> None:self.create_success() | 1 | 2 | 1 | 12 | 0 | 377 | 378 | 377 | self | [] | None | {"Expr": 1} | 1 | 2 | 1 | ["self.create_success"] | 0 | [] | The function (test_204) defined within the public class called TestReportTransaction, that inherit another class.The function start at line 377 and ends at 378. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 fu... |
maxmind_minfraud-api-python | TestReportTransaction | public | 0 | 1 | test_204_on_request_with_nones | def test_204_on_request_with_nones(self) -> None:self.create_success(request={"ip_address": "81.2.69.60","tag": "chargeback","chargeback_code": None,"maxmind_id": None,"minfraud_id": None,"notes": None,},) | 1 | 11 | 1 | 41 | 0 | 380 | 390 | 380 | self | [] | None | {"Expr": 1} | 1 | 11 | 1 | ["self.create_success"] | 0 | [] | The function (test_204_on_request_with_nones) defined within the public class called TestReportTransaction, that inherit another class.The function start at line 380 and ends at 390. It contains 11 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any v... |
maxmind_minfraud-api-python | BaseTest | public | 0 | 1 | setUp | def setUp(self) -> None:self._loop = asyncio.new_event_loop()super().setUp() | 1 | 3 | 1 | 23 | 0 | 394 | 396 | 394 | self | [] | None | {"Assign": 5, "With": 2} | 10 | 22 | 10 | ["self.client_class", "os.path.join", "os.path.dirname", "builtins.open", "os.path.join", "file.read", "json.loads", "builtins.open", "os.path.join", "file.read"] | 303 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508200_spiral_project_daybed.daybed.tests.test_backend_py.TestCouchDBBackend.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508200_spiral_project_daybed.daybed.tests.test_backend_py.TestMemoryBackend.setUp"... | The function (setUp) defined within the public class called BaseTest, that inherit another class.The function start at line 394 and ends at 396. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 10.0 functions, It ha... |
maxmind_minfraud-api-python | AsyncBase | public | 0 | 1 | tearDown | def tearDown(self) -> None:self._loop.run_until_complete(self.client.close())# type: ignore[attr-defined]self._loop.close()super().tearDown() | 1 | 4 | 1 | 35 | 0 | 398 | 401 | 398 | self | [] | None | {"Expr": 3} | 5 | 4 | 5 | ["self._loop.run_until_complete", "self.client.close", "self._loop.close", "tearDown", "super"] | 43 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3535444_stormpath_stormpath_flask.tests.test_settings_py.TestCheckSettings.tearDown", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3581987_googlecloudplatform_datastore_ndb_python.ndb.test_utils_py.NDBCloudDatastor... | The function (tearDown) defined within the public class called AsyncBase, that inherit another class.The function start at line 398 and ends at 401. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 5.0 functions, It... |
maxmind_minfraud-api-python | BaseTest | public | 0 | 1 | run_client | def run_client(self, v):# noqa: ANN001return self._loop.run_until_complete(v) | 1 | 2 | 2 | 16 | 0 | 403 | 404 | 403 | self,v | [] | Returns | {"Return": 1} | 0 | 2 | 0 | [] | 0 | [] | The function (run_client) defined within the public class called BaseTest, that inherit another class.The function start at line 403 and ends at 404. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [403.0], and this function return a value.. |
etianen_django-reversion | public | public | 0 | 0 | read | def read(filepath):with open(filepath, encoding="utf-8") as f:return f.read() | 1 | 3 | 1 | 23 | 0 | 19 | 21 | 19 | filepath | [] | Returns | {"Return": 1, "With": 1} | 2 | 3 | 2 | ["open", "f.read"] | 270 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.integration.test_typedb_py.test_Transaction.test_query_batch_all", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18354993_vaticle_typedb_client_python.tests.integration.te... | The function (read) defined within the public class called public.The function start at line 19 and ends at 21. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declares 2.0 functions, It has 2.0 functions called inside ... |
etianen_django-reversion | _RollBackRevisionView | protected | 0 | 1 | __init__ | def __init__(self, response):self.response = response | 1 | 2 | 2 | 12 | 0 | 25 | 26 | 25 | self,response | [] | None | {"Assign": 1} | 0 | 2 | 0 | [] | 4,993 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16379211_lorcalhost_btb_manager_telegram.btb_manager_telegram.logging_py.LoggerHandler.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16379211_lorcalhost_btb_manager_telegram.btb_manager_telegram.schedule_... | The function (__init__) defined within the protected class called _RollBackRevisionView, that inherit another class.The function start at line 25 and ends at 26. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [25.0] and does not return any value. It has 4993.0... |
etianen_django-reversion | VersionAdmin | public | 0 | 1 | reversion_register | def reversion_register(self, model, **kwargs):"""Registers the model with reversion."""register(model, **kwargs) | 1 | 2 | 3 | 18 | 0 | 43 | 45 | 43 | self,model,**kwargs | [] | None | {"Expr": 2} | 1 | 3 | 1 | ["register"] | 0 | [] | The function (reversion_register) defined within the public class called VersionAdmin, that inherit another class.The function start at line 43 and ends at 45. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [43.0] and does not return any value. It declare 1.0 ... |
etianen_django-reversion | VersionAdmin | public | 0 | 1 | create_revision | def create_revision(self, request):with create_revision():set_user(request.user)yield | 1 | 4 | 2 | 19 | 0 | 48 | 51 | 48 | self,request | [] | None | {"Expr": 2, "With": 1} | 2 | 4 | 2 | ["create_revision", "set_user"] | 5 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.admin_py.VersionAdmin.create_revision", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.management.commands.createinitialrevisions_... | The function (create_revision) defined within the public class called VersionAdmin, that inherit another class.The function start at line 48 and ends at 51. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [48.0] and does not return any value. It declares 2.0 fu... |
etianen_django-reversion | VersionAdmin | public | 0 | 1 | _reversion_get_template_list | def _reversion_get_template_list(self, template_name):opts = self.model._metareturn (f"reversion/{opts.app_label}/{opts.object_name.lower()}/{template_name}",f"reversion/{opts.app_label}/{template_name}","reversion/%s" % template_name,) | 1 | 7 | 2 | 27 | 0 | 55 | 61 | 55 | self,template_name | [] | Returns | {"Assign": 1, "Return": 1} | 1 | 7 | 1 | ["opts.object_name.lower"] | 0 | [] | The function (_reversion_get_template_list) defined within the public class called VersionAdmin, that inherit another class.The function start at line 55 and ends at 61. It contains 7 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [55.0], and this function return a value. I... |
etianen_django-reversion | VersionAdmin | public | 0 | 1 | _reversion_order_version_queryset | def _reversion_order_version_queryset(self, queryset):"""Applies the correct ordering to the given version queryset."""if not self.history_latest_first:queryset = queryset.order_by("pk")return queryset | 2 | 4 | 2 | 24 | 0 | 63 | 67 | 63 | self,queryset | [] | Returns | {"Assign": 1, "Expr": 1, "If": 1, "Return": 1} | 1 | 5 | 1 | ["queryset.order_by"] | 0 | [] | The function (_reversion_order_version_queryset) defined within the public class called VersionAdmin, that inherit another class.The function start at line 63 and ends at 67. It contains 4 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [63.0], and this function return a val... |
etianen_django-reversion | VersionAdmin | public | 0 | 1 | log_addition | def log_addition(self, request, object, message):change_message = message or _("Initial version.")entry = super().log_addition(request, object, change_message)if is_active():set_comment(entry.get_change_message())return entry | 3 | 6 | 4 | 48 | 0 | 71 | 76 | 71 | self,request,object,message | [] | Returns | {"Assign": 2, "Expr": 1, "If": 1, "Return": 1} | 6 | 6 | 6 | ["_", "log_addition", "super", "is_active", "set_comment", "entry.get_change_message"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.admin_py.VersionAdmin.log_addition"] | The function (log_addition) defined within the public class called VersionAdmin, that inherit another class.The function start at line 71 and ends at 76. It contains 6 lines of code and it has a cyclomatic complexity of 3. It takes 4 parameters, represented as [71.0], and this function return a value. It declares 6.0 f... |
etianen_django-reversion | VersionAdmin | public | 0 | 1 | log_change | def log_change(self, request, object, message):entry = super().log_change(request, object, message)if is_active():set_comment(entry.get_change_message())return entry | 2 | 5 | 4 | 40 | 0 | 78 | 82 | 78 | self,request,object,message | [] | Returns | {"Assign": 1, "Expr": 1, "If": 1, "Return": 1} | 5 | 5 | 5 | ["log_change", "super", "is_active", "set_comment", "entry.get_change_message"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.admin_py.VersionAdmin.log_change"] | The function (log_change) defined within the public class called VersionAdmin, that inherit another class.The function start at line 78 and ends at 82. It contains 5 lines of code and it has a cyclomatic complexity of 2. It takes 4 parameters, represented as [78.0], and this function return a value. It declares 5.0 fun... |
etianen_django-reversion | VersionAdmin | public | 0 | 1 | _reversion_autoregister | def _reversion_autoregister(self, model, follow):if not is_registered(model):for parent_model, field in model._meta.concrete_model._meta.parents.items():follow += (field.name,)self._reversion_autoregister(parent_model, ())self.reversion_register(model, follow=follow) | 3 | 6 | 3 | 62 | 0 | 86 | 91 | 86 | self,model,follow | [] | None | {"AugAssign": 1, "Expr": 2, "For": 1, "If": 1} | 4 | 6 | 4 | ["is_registered", "model._meta.concrete_model._meta.parents.items", "self._reversion_autoregister", "self.reversion_register"] | 0 | [] | The function (_reversion_autoregister) defined within the public class called VersionAdmin, that inherit another class.The function start at line 86 and ends at 91. It contains 6 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [86.0] and does not return any value. It declare... |
etianen_django-reversion | VersionAdmin | public | 0 | 1 | _reversion_introspect_inline_admin | def _reversion_introspect_inline_admin(self, inline):inline_model = Nonefollow_field = Nonefk_name = Noneif issubclass(inline, GenericInlineModelAdmin):inline_model = inline.modelct_field = inline.ct_fieldfk_name = inline.ct_fk_fieldfor field in self.model._meta.private_fields:if (isinstance(field, GenericRelation) and... | 14 | 33 | 2 | 201 | 0 | 93 | 125 | 93 | self,inline | [] | Returns | {"Assign": 13, "For": 2, "If": 6, "Return": 1} | 9 | 33 | 9 | ["issubclass", "isinstance", "issubclass", "inline_model._meta.get_fields", "isinstance", "issubclass", "inline_model._meta.get_field", "inline_model._meta.get_field", "field.remote_field.get_accessor_name"] | 0 | [] | The function (_reversion_introspect_inline_admin) defined within the public class called VersionAdmin, that inherit another class.The function start at line 93 and ends at 125. It contains 33 lines of code and it has a cyclomatic complexity of 14. It takes 2 parameters, represented as [93.0], and this function return a... |
etianen_django-reversion | _RollBackRevisionView | protected | 0 | 1 | __init__ | def __init__(self, *args, **kwargs):super().__init__(*args, **kwargs)# Automatically register models if required.if not is_registered(self.model):inline_fields = ()for inline in self.inlines:inline_model, follow_field = self._reversion_introspect_inline_admin(inline)if inline_model:self._reversion_autoregister(inline_m... | 5 | 11 | 3 | 84 | 0 | 127 | 138 | 127 | self,response | [] | None | {"Assign": 1} | 0 | 2 | 0 | [] | 4,993 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16379211_lorcalhost_btb_manager_telegram.btb_manager_telegram.logging_py.LoggerHandler.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16379211_lorcalhost_btb_manager_telegram.btb_manager_telegram.schedule_... | The function (__init__) defined within the protected class called _RollBackRevisionView, that inherit another class.The function start at line 127 and ends at 138. It contains 11 lines of code and it has a cyclomatic complexity of 5. It takes 3 parameters, represented as [127.0] and does not return any value. It has 49... |
etianen_django-reversion | VersionAdmin | public | 0 | 1 | get_urls | def get_urls(self):urls = super().get_urls()admin_site = self.admin_siteopts = self.model._metainfo = opts.app_label, opts.model_name,reversion_urls = [re_path(r"^recover/$", admin_site.admin_view(self.recoverlist_view), name='%s_%s_recoverlist' % info),re_path(r"^recover/(\d+)/$", admin_site.admin_view(self.recover_vi... | 1 | 15 | 1 | 108 | 0 | 140 | 154 | 140 | self | [] | Returns | {"Assign": 5, "Return": 1} | 8 | 15 | 8 | ["get_urls", "super", "re_path", "admin_site.admin_view", "re_path", "admin_site.admin_view", "re_path", "admin_site.admin_view"] | 4 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3646959_kristianoellegaard_django_hvad.hvad.admin_py.TranslatableAdmin.get_urls", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3646959_kristianoellegaard_django_hvad.hvad.admin_py.TranslatableInlineModelAdmin.get_u... | The function (get_urls) defined within the public class called VersionAdmin, that inherit another class.The function start at line 140 and ends at 154. It contains 15 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declares 8.0 funct... |
etianen_django-reversion | VersionAdmin | public | 0 | 1 | add_view | def add_view(self, request, form_url='', extra_context=None):with self.create_revision(request):return super().add_view(request, form_url, extra_context) | 1 | 3 | 4 | 36 | 0 | 158 | 160 | 158 | self,request,form_url,extra_context | [] | Returns | {"Return": 1, "With": 1} | 3 | 3 | 3 | ["self.create_revision", "add_view", "super"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.admin_py.VersionAdmin.add_view"] | The function (add_view) defined within the public class called VersionAdmin, that inherit another class.The function start at line 158 and ends at 160. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [158.0], and this function return a value. It declares 3.0 fu... |
etianen_django-reversion | VersionAdmin | public | 0 | 1 | change_view | def change_view(self, request, object_id, form_url='', extra_context=None):with self.create_revision(request):return super().change_view(request, object_id, form_url, extra_context) | 1 | 3 | 5 | 40 | 0 | 162 | 164 | 162 | self,request,object_id,form_url,extra_context | [] | Returns | {"Return": 1, "With": 1} | 3 | 3 | 3 | ["self.create_revision", "change_view", "super"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.admin_py.VersionAdmin.change_view", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.57092491_pinax_pinax_stripe_light.pinax.stripe.admin_py.ModelAdmin.change_view"] | The function (change_view) defined within the public class called VersionAdmin, that inherit another class.The function start at line 162 and ends at 164. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [162.0], and this function return a value. It declares 3.0... |
etianen_django-reversion | VersionAdmin | public | 0 | 1 | _reversion_revisionform_view | def _reversion_revisionform_view(self, request, version, template_name, extra_context=None):# Check that database transactions are supported.if not connections[version.db].features.uses_savepoints:raise ImproperlyConfigured("Cannot use VersionAdmin with a database that does not support savepoints.")# Determine whether ... | 8 | 31 | 5 | 240 | 0 | 166 | 207 | 166 | self,request,version,template_name,extra_context | [] | Returns | {"Assign": 5, "Expr": 4, "If": 4, "Return": 3, "Try": 1, "With": 2} | 19 | 42 | 19 | ["ImproperlyConfigured", "mute_signals", "nullcontext", "transaction.atomic", "version.revision.revert", "self.create_revision", "self.changeform_view", "quote", "set_comment", "_", "localize", "template_localtime", "response.render", "_RollBackRevisionView", "RevertError", "_", "messages.error", "force_str", "redirect... | 0 | [] | The function (_reversion_revisionform_view) defined within the public class called VersionAdmin, that inherit another class.The function start at line 166 and ends at 207. It contains 31 lines of code and it has a cyclomatic complexity of 8. It takes 5 parameters, represented as [166.0], and this function return a valu... |
etianen_django-reversion | VersionAdmin | public | 0 | 1 | recover_view | def recover_view(self, request, version_id, extra_context=None):"""Displays a form that can recover a deleted model."""# The revisionform view will check for change permission (via changeform_view),# but we also need to check for add permissions here.if not self.has_add_permission(request):raise PermissionDenied# Rende... | 4 | 15 | 4 | 90 | 0 | 209 | 227 | 209 | self,request,version_id,extra_context | [] | Returns | {"Assign": 2, "Expr": 2, "If": 1, "Return": 1} | 6 | 19 | 6 | ["self.has_add_permission", "get_object_or_404", "_", "context.update", "self._reversion_revisionform_view", "self._reversion_get_template_list"] | 0 | [] | The function (recover_view) defined within the public class called VersionAdmin, that inherit another class.The function start at line 209 and ends at 227. It contains 15 lines of code and it has a cyclomatic complexity of 4. It takes 4 parameters, represented as [209.0], and this function return a value. It declares 6... |
etianen_django-reversion | VersionAdmin | public | 0 | 1 | revision_view | def revision_view(self, request, object_id, version_id, extra_context=None):"""Displays the contents of the given revision."""object_id = unquote(object_id)# Underscores in primary key get quoted to "_5F"version = get_object_or_404(Version, pk=version_id, object_id=object_id)context = {"title": _("Revert %(name)s") % {... | 3 | 14 | 5 | 91 | 0 | 229 | 243 | 229 | self,request,object_id,version_id,extra_context | [] | Returns | {"Assign": 3, "Expr": 2, "Return": 1} | 6 | 15 | 6 | ["unquote", "get_object_or_404", "_", "context.update", "self._reversion_revisionform_view", "self._reversion_get_template_list"] | 0 | [] | The function (revision_view) defined within the public class called VersionAdmin, that inherit another class.The function start at line 229 and ends at 243. It contains 14 lines of code and it has a cyclomatic complexity of 3. It takes 5 parameters, represented as [229.0], and this function return a value. It declares ... |
etianen_django-reversion | VersionAdmin | public | 0 | 1 | changelist_view | def changelist_view(self, request, extra_context=None):with self.create_revision(request):context = {"has_change_permission": self.has_change_permission(request),}context.update(extra_context or {})return super().changelist_view(request, context) | 2 | 7 | 3 | 52 | 0 | 245 | 251 | 245 | self,request,extra_context | [] | Returns | {"Assign": 1, "Expr": 1, "Return": 1, "With": 1} | 5 | 7 | 5 | ["self.create_revision", "self.has_change_permission", "context.update", "changelist_view", "super"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.admin_py.VersionAdmin.changelist_view", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3923647_code4romania_covid_19_ro_help.ro_help.hub.admin_py.RegisterNGORequestAdmin.cha... | The function (changelist_view) defined within the public class called VersionAdmin, that inherit another class.The function start at line 245 and ends at 251. It contains 7 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [245.0], and this function return a value. It declares... |
etianen_django-reversion | VersionAdmin | public | 0 | 1 | recoverlist_view | def recoverlist_view(self, request, extra_context=None):"""Displays a deleted model to allow recovery."""# Check if user has change and add permissions for modelif not self.has_change_permission(request) or not self.has_add_permission(request):raise PermissionDeniedmodel = self.modelopts = model._metadeleted = self._re... | 5 | 23 | 3 | 155 | 0 | 253 | 279 | 253 | self,request,extra_context | [] | Returns | {"Assign": 5, "Expr": 2, "If": 1, "Return": 1} | 13 | 27 | 13 | ["self.has_change_permission", "self.has_add_permission", "self._reversion_order_version_queryset", "select_related", "Version.objects.get_deleted", "dict", "self.admin_site.each_context", "capfirst", "_", "force_str", "context.update", "render", "self._reversion_get_template_list"] | 0 | [] | The function (recoverlist_view) defined within the public class called VersionAdmin, that inherit another class.The function start at line 253 and ends at 279. It contains 23 lines of code and it has a cyclomatic complexity of 5. It takes 3 parameters, represented as [253.0], and this function return a value. It declar... |
etianen_django-reversion | VersionAdmin | public | 0 | 1 | history_view | def history_view(self, request, object_id, extra_context=None):"""Renders the history view."""# Check if user has view or change permissions for modelif hasattr(self, 'has_view_or_change_permission'):# for Django >= 2.1if not self.has_view_or_change_permission(request):raise PermissionDeniedelse:if not self.has_change_... | 6 | 25 | 4 | 146 | 0 | 281 | 309 | 281 | self,request,object_id,extra_context | [] | Returns | {"Assign": 3, "Expr": 2, "If": 3, "Return": 1} | 12 | 29 | 12 | ["hasattr", "self.has_view_or_change_permission", "self.has_change_permission", "reverse", "quote", "self._reversion_order_version_queryset", "select_related", "Version.objects.get_for_object_reference", "unquote", "context.update", "history_view", "super"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.admin_py.VersionAdmin.history_view"] | The function (history_view) defined within the public class called VersionAdmin, that inherit another class.The function start at line 281 and ends at 309. It contains 25 lines of code and it has a cyclomatic complexity of 6. It takes 4 parameters, represented as [281.0], and this function return a value. It declares 1... |
etianen_django-reversion | RevisionMiddleware | public | 0 | 0 | __init__ | def __init__(self, get_response):self.get_response = create_revision(manage_manually=self.manage_manually,using=self.using,atomic=self.atomic,request_creates_revision=self.request_creates_revision)(get_response) | 1 | 7 | 2 | 40 | 0 | 14 | 20 | 14 | self,get_response | [] | None | {"Assign": 1} | 1 | 7 | 1 | ["create_revision"] | 4,993 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16379211_lorcalhost_btb_manager_telegram.btb_manager_telegram.logging_py.LoggerHandler.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16379211_lorcalhost_btb_manager_telegram.btb_manager_telegram.schedule_... | The function (__init__) defined within the public class called RevisionMiddleware.The function start at line 14 and ends at 20. It contains 7 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [14.0] and does not return any value. It declare 1.0 function, It has 1.0 function ca... |
etianen_django-reversion | RevisionMiddleware | public | 0 | 0 | request_creates_revision | def request_creates_revision(self, request):return _request_creates_revision(request) | 1 | 2 | 2 | 12 | 0 | 22 | 23 | 22 | self,request | [] | Returns | {"Return": 1} | 1 | 2 | 1 | ["_request_creates_revision"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.views_py.create_revision"] | The function (request_creates_revision) defined within the public class called RevisionMiddleware.The function start at line 22 and ends at 23. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [22.0], and this function return a value. It declare 1.0 function, It... |
etianen_django-reversion | RevisionMiddleware | public | 0 | 0 | __call__ | def __call__(self, request):return self.get_response(request) | 1 | 2 | 2 | 14 | 0 | 25 | 26 | 25 | self,request | [] | Returns | {"Return": 1} | 1 | 2 | 1 | ["self.get_response"] | 25 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3657361_openstack_archive_syntribos.syntribos.utils.file_utils_py.ContentType.__call__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3695822_home_assistant_libs_aiohue.tests.v2.test_button_controller_py.CopyingMoc... | The function (__call__) defined within the public class called RevisionMiddleware.The function start at line 25 and ends at 26. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [25.0], and this function return a value. It declare 1.0 function, It has 1.0 functio... |
etianen_django-reversion | public | public | 0 | 0 | _safe_revert | def _safe_revert(versions):unreverted_versions = []for version in versions:try:with transaction.atomic(using=version.db):version.revert()except (IntegrityError, ObjectDoesNotExist):logger.warning(f'Could not revert to {version}', exc_info=True)unreverted_versions.append(version)if len(unreverted_versions) == len(versio... | 5 | 15 | 1 | 93 | 1 | 29 | 43 | 29 | versions | ['unreverted_versions'] | None | {"Assign": 1, "Expr": 4, "For": 1, "If": 2, "Try": 1, "With": 1} | 9 | 15 | 9 | ["transaction.atomic", "version.revert", "logger.warning", "unreverted_versions.append", "len", "len", "RevertError", "gettext", "_safe_revert"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.models_py.Revision.revert", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.models_py._safe_revert"] | The function (_safe_revert) defined within the public class called public.The function start at line 29 and ends at 43. It contains 15 lines of code and it has a cyclomatic complexity of 5. The function does not take any parameters and does not return any value. It declares 9.0 functions, It has 9.0 functions called in... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.