FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Organized and cleaned up the Code by RISHII-BHARADHWAJ · Pull Request #587 · aboutcode-org/aboutcode-toolkit · GitHub

Organized and cleaned up the Code - #587

Open
RISHII-BHARADHWAJ wants to merge 2 commits into
aboutcode-org:developfrom
RISHII-BHARADHWAJ:develop
Open

Organized and cleaned up the Code#587
RISHII-BHARADHWAJ wants to merge 2 commits into
aboutcode-org:developfrom
RISHII-BHARADHWAJ:develop

Conversation

Copy link
Copy Markdown

I have made the necessary changes to the files util.py,models.py and transform.py.
Hope this solves the issue of duplication of code and makes it look more organized and clean.

Copy link
Copy Markdown
Contributor

@RISHII-BHARADHWAJ Thank you for your efforts on this. It appears that the test code has not been updated, which is causing the tests to fail. Please make the necessary corrections.

Copy link
Copy Markdown
Author

@chinyeungli Ye sure

Signed-off-by: Rishii <whitedevilrishii@gmail.com>
…t and template issues, update tests for AboutCode Toolkit

chinyeungli left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thank you for the work on this, and apologies for the delayed review.
Please refer to the comments.

rendered = template.render(
abouts=abouts,
common_licenses=COMMON_LICENSES,
common_licenses=[lic.key for lic in licenses_list],

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

The COMMON_LICENSES (https://github.com/aboutcode-org/aboutcode-toolkit/blob/develop/src/attributecode/licenses.py) contains commonly encountered licenses in general, not the licenses actually detected within a specific codebase

Comment thread src/attributecode/gen.py
# limitations under the License.
# ============================================================================

import saneyaml

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Why do I need to import saneyaml if it isn’t used?

from attributecode.util import ungroup_licenses
from attributecode.util import ungroup_licenses_from_sctk
from attributecode import Error, CRITICAL, ERROR, WARNING, INFO
from attributecode.util import (

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

For consistency, it would be better to keep those import statements inline rather than grouped in a set.

from attributecode import saneyaml
from attributecode.util import csv
from attributecode.util import replace_tab_with_spaces
from attributecode.util import (

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

For consistency, it would be better to keep those import statements inline rather than grouped in a set.

Comment thread src/attributecode/util.py
from attributecode import WARNING
from attributecode import Error
from attributecode import __version__
from attributecode import Error

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

It’s a duplicated import.

@@ -0,0 +1,1491 @@
============================= test session starts ==============================

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

what's this file about?

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL