Uh oh!
There was an error while loading. Please reload this page.
Create blacklistipchecker.py - #9416
Conversation
There was a problem hiding this comment.
Click here to look at the relevant links ⬇️
🔗 Relevant Links
Repository:
Python:
Automated review generated by algorithms-keeper. If there's any problem regarding this review, please open an issue about it.
algorithms-keeper commands and options
algorithms-keeper actions can be triggered by commenting on this PR:
@algorithms-keeper reviewto trigger the checks for only added pull request files@algorithms-keeper review-allto trigger the checks for all the pull request files, including the modified files. As we cannot post review comments on lines not part of the diff, this command will post all the messages in one comment.NOTE: Commands are in beta and so this feature is restricted only to a member or owner of the organization.
Uh oh!
There was an error while loading. Please reload this page.
for more information, see https://pre-commit.ci
| else: | ||
| try: | ||
| IP(x) | ||
| except: |
| x = input() | ||
| try: | ||
| IP(x) | ||
| except: |
There was a problem hiding this comment.
IPy literally works that way. I can easily fix it with
except Exception as ex:
print('Failed \n" + ex + 'Finishing \n")
There was a problem hiding this comment.
There was a problem hiding this comment.
Got it. I can fix it by using logging module. What should i do next?
There was a problem hiding this comment.
Click details next to each of the failing ❌ tests below and try to get them to be green ✅
added logging for exceptions, fixed invalid var name,
There was a problem hiding this comment.
Click here to look at the relevant links ⬇️
🔗 Relevant Links
Repository:
Python:
Automated review generated by algorithms-keeper. If there's any problem regarding this review, please open an issue about it.
algorithms-keeper commands and options
algorithms-keeper actions can be triggered by commenting on this PR:
@algorithms-keeper reviewto trigger the checks for only added pull request files@algorithms-keeper review-allto trigger the checks for all the pull request files, including the modified files. As we cannot post review comments on lines not part of the diff, this command will post all the messages in one comment.NOTE: Commands are in beta and so this feature is restricted only to a member or owner of the organization.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
for more information, see https://pre-commit.ci
added type-hints, fixed var name
There was a problem hiding this comment.
Click here to look at the relevant links ⬇️
🔗 Relevant Links
Repository:
Python:
Automated review generated by algorithms-keeper. If there's any problem regarding this review, please open an issue about it.
algorithms-keeper commands and options
algorithms-keeper actions can be triggered by commenting on this PR:
@algorithms-keeper reviewto trigger the checks for only added pull request files@algorithms-keeper review-allto trigger the checks for all the pull request files, including the modified files. As we cannot post review comments on lines not part of the diff, this command will post all the messages in one comment.NOTE: Commands are in beta and so this feature is restricted only to a member or owner of the organization.
Uh oh!
There was an error while loading. Please reload this page.
Fixed type hint
Fixed type hints, and list creation err
There was a problem hiding this comment.
Click here to look at the relevant links ⬇️
🔗 Relevant Links
Repository:
Python:
Automated review generated by algorithms-keeper. If there's any problem regarding this review, please open an issue about it.
algorithms-keeper commands and options
algorithms-keeper actions can be triggered by commenting on this PR:
@algorithms-keeper reviewto trigger the checks for only added pull request files@algorithms-keeper review-allto trigger the checks for all the pull request files, including the modified files. As we cannot post review comments on lines not part of the diff, this command will post all the messages in one comment.NOTE: Commands are in beta and so this feature is restricted only to a member or owner of the organization.
| @@ -0,0 +1,122 @@ | |||
| ###################################### | |||
There was a problem hiding this comment.
An error occurred while parsing the file: other/blacklistipchecker.py
Traceback (mostrecentcalllast):
File"/opt/render/project/src/algorithms_keeper/parser/python_parser.py", line146, inparsereports=lint_file(
^^^^^^^^^^libcst._exceptions.ParserSyntaxError: SyntaxError @ 1:1.tokenizererror: unterminatedstringliteral######################################^Fixed bunch of hasher in the beginning of file
for more information, see https://pre-commit.ci
Removed e-mail functionality to pass tests
for more information, see https://pre-commit.ci
Fixed deprecated type hints, sorted imports
for more information, see https://pre-commit.ci
Sorted imports with isort
for more information, see https://pre-commit.ci
Fixed some types mismatch
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Christian Clauss <cclauss@me.com>
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Click here to look at the relevant links ⬇️
🔗 Relevant Links
Repository:
Python:
Automated review generated by algorithms-keeper. If there's any problem regarding this review, please open an issue about it.
algorithms-keeper commands and options
algorithms-keeper actions can be triggered by commenting on this PR:
@algorithms-keeper reviewto trigger the checks for only added pull request files@algorithms-keeper review-allto trigger the checks for all the pull request files, including the modified files. As we cannot post review comments on lines not part of the diff, this command will post all the messages in one comment.NOTE: Commands are in beta and so this feature is restricted only to a member or owner of the organization.
| link = f"https://api.blacklistchecker.com/check/{ip}" | ||
| result = requests.get(link, auth=(api_key, "") | ||
| result_dec = json.loads(result.content) | ||
| print(result_dec) |
There was a problem hiding this comment.
An error occurred while parsing the file: other/blacklistipchecker.py
Traceback (mostrecentcalllast):
File"/opt/render/project/src/algorithms_keeper/parser/python_parser.py", line146, inparsereports=lint_file(
^^^^^^^^^^libcst._exceptions.ParserSyntaxError: SyntaxError @ 20:16.parsererror: errorat19:15: expectedoneof!=, %, &, (, *, **, +, ,, -, ., /, //, <, <<, <=, ==, >, >=, >>, @, [, ^, and, if, in, is, not, or, |print(result_dec)
^Co-authored-by: Christian Clauss <cclauss@me.com>
There was a problem hiding this comment.
Click here to look at the relevant links ⬇️
🔗 Relevant Links
Repository:
Python:
Automated review generated by algorithms-keeper. If there's any problem regarding this review, please open an issue about it.
algorithms-keeper commands and options
algorithms-keeper actions can be triggered by commenting on this PR:
@algorithms-keeper reviewto trigger the checks for only added pull request files@algorithms-keeper review-allto trigger the checks for all the pull request files, including the modified files. As we cannot post review comments on lines not part of the diff, this command will post all the messages in one comment.NOTE: Commands are in beta and so this feature is restricted only to a member or owner of the organization.
| link = f"https://api.blacklistchecker.com/check/{ip}" | ||
| result = requests.get(link, auth=(api_key, "") | ||
| result_dec = json.loads(result.content) | ||
| print(result_dec) |
There was a problem hiding this comment.
An error occurred while parsing the file: other/blacklistipchecker.py
Traceback (mostrecentcalllast):
File"/opt/render/project/src/algorithms_keeper/parser/python_parser.py", line146, inparsereports=lint_file(
^^^^^^^^^^libcst._exceptions.ParserSyntaxError: SyntaxError @ 20:16.parsererror: errorat19:15: expectedoneof!=, %, &, (, *, **, +, ,, -, ., /, //, <, <<, <=, ==, >, >=, >>, @, [, ^, and, if, in, is, not, or, |print(result_dec)
^missing ")"
There was a problem hiding this comment.
Click here to look at the relevant links ⬇️
🔗 Relevant Links
Repository:
Python:
Automated review generated by algorithms-keeper. If there's any problem regarding this review, please open an issue about it.
algorithms-keeper commands and options
algorithms-keeper actions can be triggered by commenting on this PR:
@algorithms-keeper reviewto trigger the checks for only added pull request files@algorithms-keeper review-allto trigger the checks for all the pull request files, including the modified files. As we cannot post review comments on lines not part of the diff, this command will post all the messages in one comment.NOTE: Commands are in beta and so this feature is restricted only to a member or owner of the organization.
| detects = "!" | ||
| return (res, detects) | ||
| else result_dec.get("detections") != 0: | ||
| res = ip |
There was a problem hiding this comment.
An error occurred while parsing the file: other/blacklistipchecker.py
Traceback (mostrecentcalllast):
File"/opt/render/project/src/algorithms_keeper/parser/python_parser.py", line146, inparsereports=lint_file(
^^^^^^^^^^libcst._exceptions.ParserSyntaxError: SyntaxError @ 26:17.parsererror: errorat25:19: expected :
res=ip^added missing rightside comparison agrument
Changed var type
added type-hints
for more information, see https://pre-commit.ci
fixed double var definition
dimonalik
commented
Oct 3, 2023
Who can review this PR? @cclauss help please |
cclauss
commented
Sep 3, 2026
This is a how-to-use, not an algorithm as discussed in CONTRIBUTING.md |
Describe your change:
Checklist: