-
Notifications
You must be signed in to change notification settings - Fork 0
🧹 [Code Health] Remove duplicated sys.path boilerplate from Scripts #149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,8 @@ | ||
| import unittest | ||
| import sys | ||
| from pathlib import Path | ||
| import hashlib | ||
|
|
||
| # Add current directory to path | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. WARNING: Orphaned comment - the sys.path manipulation code this comment referred to has been removed. This comment is now misleading and should be removed. |
||
| if str(Path(__file__).parent) not in sys.path: | ||
| sys.path.append(str(Path(__file__).parent)) | ||
|
|
||
| from common import sanitize_filename, is_valid_domain, is_adguard_rule | ||
|
Comment on lines
5
to
7
|
||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,6 @@ | ||
| import unittest | ||
| import sys | ||
| from pathlib import Path | ||
|
|
||
| # Add current directory to path to allow importing deduplicate | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. WARNING: Orphaned comment - the sys.path manipulation code this comment referred to has been removed. This comment is now misleading and should be removed. |
||
| if str(Path(__file__).parent) not in sys.path: | ||
| sys.path.append(str(Path(__file__).parent)) | ||
|
|
||
| from deduplicate import process_content | ||
|
Comment on lines
3
to
5
|
||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment about adding the script directory to
sys.pathis now stale since thesys.pathmodification was removed. Please remove or update this comment to avoid misleading future readers.