Skip to content

Commit

Permalink
pep change
Browse files Browse the repository at this point in the history
  • Loading branch information
wangxu60 committed Dec 1, 2024
1 parent 2f39a9b commit ef8896e
Show file tree
Hide file tree
Showing 9 changed files with 7 additions and 59 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,7 @@ jobs:
with:
python-version: "3.11"
- name: flake8 Lint
uses: py-actions/flake8@v2
uses: py-actions/flake8@v2
with:
ignore: "E266,W293"
max-line-length: "200"
8 changes: 0 additions & 8 deletions .idea/.gitignore

This file was deleted.

7 changes: 0 additions & 7 deletions .idea/Phishpedia.iml

This file was deleted.

28 changes: 0 additions & 28 deletions .idea/deployment.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/inspectionProfiles/profiles_settings.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/vcs.xml

This file was deleted.

2 changes: 1 addition & 1 deletion GUI/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def set_dynamic_font_size(self):
font.setPointSizeF(font_size)

for widget in self.findChildren(QLabel) + self.findChildren(QLineEdit) + self.findChildren(QPushButton) + [
self.result_display]:
self.result_display]:
widget.setFont(font)

def init_phish_test_page(self):
Expand Down
2 changes: 1 addition & 1 deletion phishpedia.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from logo_recog import pred_rcnn, vis
from logo_matching import check_domain_brand_inconsistency
# from text_recog import check_email_credential_taking
import pickle
# import pickle
from tqdm import tqdm

import re
Expand Down
2 changes: 1 addition & 1 deletion utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def resolution_alignment(img1, img2):
w1, h1 = img1.size
w2, h2 = img2.size
w_min, h_min = min(w1, w2), min(h1, h2)
if w_min == 0 or h_min == 0: ## something wrong, stop resizing
if w_min == 0 or h_min == 0: # something wrong, stop resizing
return img1, img2
if w_min < h_min:
img1_resize = img1.resize((int(w_min), math.ceil(h1 * (w_min / w1)))) # ceiling to prevent rounding to 0
Expand Down

0 comments on commit ef8896e

Please sign in to comment.