-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add black #31
Add black #31
Conversation
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.
👍 Looks good to me! Reviewed everything up to 8d5fd73 in 1 minute and 20 seconds
More details
- Looked at
57
lines of code in2
files - Skipped
1
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. pyproject.toml:5
- Draft comment:
The authors' list is malformed. Each email should be enclosed in double quotes. Please correct the syntax.
authors = ["Scott Williams <[email protected]>", "Michael Della Bitta <[email protected]>"]
- Reason this comment was not posted:
Confidence of 0% on close inspection, compared to threshold of 50%.
Workflow ID: wflow_HbIAIM6HRfHfc3cP
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
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.
❌ Changes requested. Incremental review on b13904a in 1 minute and 8 seconds
More details
- Looked at
38
lines of code in2
files - Skipped
1
files when reviewing. - Skipped posting
0
drafted comments based on config settings.
Workflow ID: wflow_KnslXzLAFONpN0u8
Want Ellipsis to fix these issues? Tag @ellipsis-dev
in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
.github/workflows/flake8.yml
Outdated
- name: Set up Python environment | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.11" |
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 Python version specified here is 3.11, which is inconsistent with the minimum version requirement of 3.12 in pyproject.toml
. Consider aligning the Python versions to avoid potential compatibility issues.
python-version: "3.11" | |
python-version: "3.12" |
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.
❌ Changes requested. Incremental review on ccdac88 in 1 minute and 6 seconds
More details
- Looked at
31
lines of code in2
files - Skipped
0
files when reviewing. - Skipped posting
0
drafted comments based on config settings.
Workflow ID: wflow_q0lMO0yDZNqzAXxH
Want Ellipsis to fix these issues? Tag @ellipsis-dev
in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
.github/workflows/flake8.yml
Outdated
- name: Set up Python environment | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.12" |
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.
python-version: "3.12" | |
python-version: "3.11" |
Please ensure to use a stable and officially released version of Python. Currently, Python 3.12 is not released, and using Python 3.11 would be more appropriate.
|
GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
---|---|---|---|---|---|
6256332 | Triggered | Generic High Entropy Secret | 48b265c | sdc-sync.py | View secret |
6256332 | Triggered | Generic High Entropy Secret | 48b265c | sdc-sync.py | View secret |
6256332 | Triggered | Generic High Entropy Secret | 48b265c | sdc-sync.py | View secret |
6256332 | Triggered | Generic High Entropy Secret | 48b265c | sdc-sync.py | View secret |
6256332 | Triggered | Generic High Entropy Secret | efc4eda | sdc-sync.py | View secret |
6256332 | Triggered | Generic High Entropy Secret | efc4eda | sdc-sync.py | View secret |
6256332 | Triggered | Generic High Entropy Secret | efc4eda | sdc-sync.py | View secret |
6256332 | Triggered | Generic High Entropy Secret | 536dda7 | sdc-sync.py | View secret |
6256332 | Triggered | Generic High Entropy Secret | efc4eda | sdc-sync.py | View secret |
6256332 | Triggered | Generic High Entropy Secret | 536dda7 | sdc-sync.py | View secret |
6256332 | Triggered | Generic High Entropy Secret | 536dda7 | sdc-sync.py | View secret |
6256332 | Triggered | Generic High Entropy Secret | 536dda7 | sdc-sync.py | View secret |
6256332 | Triggered | Generic High Entropy Secret | 3e7c625 | sdc-sync.py | View secret |
6256332 | Triggered | Generic High Entropy Secret | 3e7c625 | sdc-sync.py | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secrets safely. Learn here the best practices.
- Revoke and rotate these secrets.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
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.
👍 Looks good to me! Incremental review on 48b265c in 2 minutes and 14 seconds
More details
- Looked at
3102
lines of code in12
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. sdc-sync.py:10
- Draft comment:
Hardcoding API keys in the source code is a security risk. Consider using environment variables or secure vault solutions to manage sensitive data securely. - Reason this comment was not posted:
Confidence of 20% on close inspection, compared to threshold of 50%.
Workflow ID: wflow_FoXyOFNnz1cKfgRl
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
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.
❌ Changes requested. Incremental review on 2d99861 in 1 minute and 20 seconds
More details
- Looked at
10
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
0
drafted comments based on config settings.
Workflow ID: wflow_h1iEt7INWF7Cr4kt
Want Ellipsis to fix these issues? Tag @ellipsis-dev
in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
wikimedia/setup.cfg
Outdated
@@ -0,0 +1,2 @@ | |||
[flake8] | |||
max-line-length = 88 |
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.
Please add a newline at the end of the file to ensure compatibility with Unix-based tools.
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.
👍 Looks good to me! Incremental review on 2f86030 in 43 seconds
More details
- Looked at
9
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. wikimedia/setup.cfg:2
- Draft comment:
Adding a newline at the end of the file is a good practice to ensure proper file formatting and compatibility with POSIX systems. - Reason this comment was not posted:
Confidence changes required:0%
The filewikimedia/setup.cfg
has been modified to include a configuration for Flake8, specifically setting themax-line-length
to 88. This is a common practice to ensure code style consistency, especially when using tools like Black which also defaults to a line length of 88. The change is straightforward and aligns with Python code style best practices. However, the diff shows that the only change made was the addition of a newline at the end of the file, which is a good practice to ensure proper file formatting and to avoid issues with POSIX systems where every line should end with a newline character.
Workflow ID: wflow_zRMCzWQw3fnZM3K0
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
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.
👍 Looks good to me! Incremental review on b838132 in 1 minute and 14 seconds
More details
- Looked at
201
lines of code in3
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. wikimedia/utilities/emailer.py:58
- Draft comment:
The import statement forutilities.helpers
should be updated to reflect the new project structure. It should bewikimedia.utilities.helpers
.
from wikimedia.utilities.helpers import Text
- Reason this comment was not posted:
Confidence of 0% on close inspection, compared to threshold of 50%.
Workflow ID: wflow_UB1ttHrj7ogWN7z7
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
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.
❌ Changes requested. Incremental review on f3c76d2 in 1 minute and 27 seconds
More details
- Looked at
15
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
0
drafted comments based on config settings.
Workflow ID: wflow_NQUJuCbardk0IKEb
Want Ellipsis to fix these issues? Tag @ellipsis-dev
in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
.github/workflows/flake8.yml
Outdated
- name: flake8 Lint | ||
uses: py-actions/flake8@v2 | ||
with: | ||
max-line-length: "88" |
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 max-line-length
setting here is redundant because it is already configured in wikimedia/setup.cfg
. Consider removing it from this workflow to centralize configuration and avoid potential inconsistencies.
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.
👍 Looks good to me! Incremental review on 536dda7 in 2 minutes and 34 seconds
More details
- Looked at
2873
lines of code in6
files - Skipped
1
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. .github/workflows/lint.yml:1
- Draft comment:
The PR description mentions the addition of a new workflow for Black linting, but the existingblack.yml
file is being deleted and no new file is added. Please clarify if a new workflow file is supposed to be added or if this deletion is intentional. - Reason this comment was not posted:
Confidence of 0% on close inspection, compared to threshold of 50%.
Workflow ID: wflow_c8y9PZm7wVGgmDFP
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
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.
👍 Looks good to me! Incremental review on eb831df in 2 minutes and 27 seconds
More details
- Looked at
36
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. .github/workflows/lint.yml:31
- Draft comment:
The Mypy command lacks specific configuration settings. Consider adding amypy.ini
file or specifying command-line options to ensure consistent and correct type checking. - Reason this comment was not posted:
Confidence of 0% on close inspection, compared to threshold of 50%.
Workflow ID: wflow_khU4O9zl7FoExkjX
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
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.
❌ Changes requested. Incremental review on bde8a37 in 1 minute and 36 seconds
More details
- Looked at
13
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
0
drafted comments based on config settings.
Workflow ID: wflow_u3RsP3WTbp9yzVW5
Want Ellipsis to fix these issues? Tag @ellipsis-dev
in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.12' |
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 specified Python version '3.12' does not exist. Please use a valid Python version, such as '3.11'.
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.
👍 Looks good to me! Incremental review on dc3b467 in 1 minute and 34 seconds
More details
- Looked at
15
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. .github/workflows/lint.yml:26
- Draft comment:
Themypy
check is missing from the linting workflow. Ifmypy
is intended to be part of the linting process, consider adding it back to ensure type checks are performed.
- name: mypy
run: |
cd wikimedia
PYTHONPATH=. poetry run mypy
- Reason this comment was not posted:
Confidence of 0% on close inspection, compared to threshold of 50%.
Workflow ID: wflow_T64EG9utkWp2FILk
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
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.
👍 Looks good to me! Incremental review on 7e1c7c8 in 1 minute and 48 seconds
More details
- Looked at
40
lines of code in2
files - Skipped
1
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. pyproject.toml:27
- Draft comment:
The PR description mentions updating dependencies includingmypy
, but there are no changes related tomypy
inpyproject.toml
. Please ensure that all intended updates are correctly reflected in the file. - Reason this comment was not posted:
Confidence of 0% on close inspection, compared to threshold of 50%.
Workflow ID: wflow_OTyYfUr5mpynddnW
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
|
GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
---|---|---|---|---|---|
2897219 | Triggered | Generic High Entropy Secret | 6afc67e | sdc-sync.py | View secret |
2897219 | Triggered | Generic High Entropy Secret | 60d1a99 | sdc-sync.py | View secret |
2897219 | Triggered | Generic High Entropy Secret | f6433d6 | sdc-sync.py | View secret |
2897219 | Triggered | Generic High Entropy Secret | 6afc67e | sdc-sync.py | View secret |
2897219 | Triggered | Generic High Entropy Secret | e8dc412 | sdc-sync.py | View secret |
2897219 | Triggered | Generic High Entropy Secret | e8dc412 | sdc-sync.py | View secret |
2897219 | Triggered | Generic High Entropy Secret | 60d1a99 | sdc-sync.py | View secret |
2897219 | Triggered | Generic High Entropy Secret | f6433d6 | sdc-sync.py | View secret |
2897219 | Triggered | Generic High Entropy Secret | 6afc67e | sdc-sync.py | View secret |
2897219 | Triggered | Generic High Entropy Secret | e8dc412 | sdc-sync.py | View secret |
2897219 | Triggered | Generic High Entropy Secret | 6afc67e | sdc-sync.py | View secret |
2897219 | Triggered | Generic High Entropy Secret | f6433d6 | sdc-sync.py | View secret |
2897219 | Triggered | Generic High Entropy Secret | f6433d6 | sdc-sync.py | View secret |
2897219 | Triggered | Generic High Entropy Secret | e8dc412 | sdc-sync.py | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secrets safely. Learn here the best practices.
- Revoke and rotate these secrets.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
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.
👍 Looks good to me! Incremental review on 6e9acec in 1 minute and 26 seconds
More details
- Looked at
40
lines of code in2
files - Skipped
1
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. pyproject.toml:27
- Draft comment:
The PR description mentions updating dependencies inpyproject.toml
, but the changes are actually made inrequirements.txt
. Please ensure the PR description accurately reflects the changes made. - Reason this comment was not posted:
Based on historical feedback, this comment is too similar to comments previously marked by users as bad.
Workflow ID: wflow_JIXnm4vaYl20aSyW
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
Summary:
This PR introduces a consolidated linting workflow, updates dependencies, adds an author, configures Flake8, and includes refactoring in
wikimedia
modules.Key points:
.github/workflows/lint.yml
for Black, Flake8, and mypy linting onpush
andpull_request
events.pyproject.toml
, includingblack
andflake8
.pyproject.toml
.wikimedia/setup.cfg
with Flake8 configuration (max-line-length = 88
).wikimedia/entries/upload.py
,wikimedia/executors/uploader.py
, andwikimedia/utilities/emailer.py
.wikimedia/entries/upload.py
andwikimedia/executors/uploader.py
for better readability and consistency.Generated with ❤️ by ellipsis.dev