Skip to content
This repository has been archived by the owner on Jul 18, 2019. It is now read-only.

Improving Code Quality #8

Open
nikoheikkila opened this issue Oct 20, 2018 · 6 comments
Open

Improving Code Quality #8

nikoheikkila opened this issue Oct 20, 2018 · 6 comments
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest Hacktoberfest help wanted Extra attention is needed

Comments

@nikoheikkila
Copy link
Owner

nikoheikkila commented Oct 20, 2018

We are using Codacy to monitor code quality and security issues. Its grade is now C B so there's some room for improvement.

Anyone willing to fix those? Discuss here if some rules need ignoring or adjustment.

@nikoheikkila nikoheikkila added enhancement New feature or request good first issue Good for newcomers hacktoberfest Hacktoberfest labels Oct 20, 2018
@embiem
Copy link

embiem commented Oct 20, 2018

Good Hacktober issue :-)

I'll work on this and create a PR later.

@embiem
Copy link

embiem commented Oct 20, 2018

There are lots of warnings for test files, e.g. because assert is used. I will add a codacy config file to exclude these files, or do you want to use another approach?

@nikoheikkila
Copy link
Owner Author

There are lots of warnings for test files, e.g. because assert is used. I will add a codacy config file to exclude these files, or do you want to use another approach?

I don't think pytest can work without asserts (unless hiding/wrapping them somehow) so let's just modify the rules.

@amirulabu
Copy link
Contributor

i want to fix
.github/ISSUE_TEMPLATE/bug_report.md
.github/ISSUE_TEMPLATE/feature_request.md

following the issues from Codacy

@nikoheikkila nikoheikkila added help wanted Extra attention is needed and removed help wanted Extra attention is needed labels Oct 21, 2018
@derekwilling
Copy link

derekwilling commented Oct 23, 2018

I am trying to fix some of the security issues in setup.py but I am not sure how to go about it. Can someone point me in the right direction?

about = {}

if not VERSION:
    with open(os.path.join(here, NAME, '__version__.py')) as f:
        exec(f.read(), about)
else:
    about["__version__"] = VERSION

How should I go about getting rid of exec? https://app.codacy.com/app/nikoheikkila/pwnedapi/file/24506394925/issues/source?bid=9308018&fileBranchId=9308018#l32

@nikoheikkila
Copy link
Owner Author

@DirtySoc exec is there to quickly read the version information from module __version__ to dictionary about. Therefore, it's not very necessary if you want to refactor fetching the version information.

Can you cooperate with @embiem to avoid conflicts on this?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest Hacktoberfest help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants