Skip to content
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

made string more clear and added justification option #28680

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

igeni
Copy link

@igeni igeni commented Mar 23, 2024

Reference Issues/PRs

What does this implement/fix? Explain your changes.

made string more clear and added justification option

Any other comments?

Copy link

❌ Linting issues

This PR is introducing linting issues. Here's a summary of the issues. Note that you can avoid having linting issues by enabling pre-commit hooks. Instructions to enable them can be found here.

You can see the details of the linting issues under the lint job here


black

black detected issues. Please run black . locally and push the changes. Here you can see the detected issues. Note that running black might also fix some of the issues which might be detected by ruff. Note that the installed black version is black=23.3.0.


--- /home/runner/work/scikit-learn/scikit-learn/sklearn/ensemble/_gb.py	2024-03-23 06:34:51.640844 +0000
+++ /home/runner/work/scikit-learn/scikit-learn/sklearn/ensemble/_gb.py	2024-03-23 06:35:05.156807 +0000
@@ -306,11 +306,18 @@
             verbose_fmt.append("{oob_impr:>16.4f}")
         header_fields.append("Remaining Time")
         verbose_fmt.append("{remaining_time:>16s}")
 
         # print the header line
-        print(''.join([f"{v:>16} " if idx else f"{v:>10} " for idx, v in enumerate(header_fields)]))
+        print(
+            "".join(
+                [
+                    f"{v:>16} " if idx else f"{v:>10} "
+                    for idx, v in enumerate(header_fields)
+                ]
+            )
+        )
 
         self.verbose_fmt = " ".join(verbose_fmt)
         # plot verbose info each time i % verbose_mod == 0
         self.verbose_mod = 1
         self.start_time = time()
would reformat /home/runner/work/scikit-learn/scikit-learn/sklearn/ensemble/_gb.py

Oh no! 💥 💔 💥
1 file would be reformatted, 914 files would be left unchanged.

ruff

ruff detected issues. Please run ruff --fix --show-source . locally, fix the remaining issues, and push the changes. Here you can see the detected issues. Note that the installed ruff version is ruff=0.3.4.


warning: The `--show-source` argument is deprecated. Use `--output-format=full` instead.
sklearn/ensemble/_gb.py:311:89: E501 Line too long (100 > 88)
    |
310 |         # print the header line
311 |         print(''.join([f"{v:>16} " if idx else f"{v:>10} " for idx, v in enumerate(header_fields)]))
    |                                                                                         ^^^^^^^^^^^^ E501
312 | 
313 |         self.verbose_fmt = " ".join(verbose_fmt)
    |

Found 1 error.

Generated for commit: cad45fa. Link to the linter CI: here

@jeremiedbb
Copy link
Member

Thanks for the PR @igeni. There are linting issues. You can see where they come from and instructions to fix them in #28680 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants