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

Pylint refactor #851

Merged
merged 27 commits into from
Mar 7, 2022

Conversation

nolanderc
Copy link
Contributor

@nolanderc nolanderc commented Mar 6, 2022

Started refactoring the codebase in order to improve the pylint score (see #761). The work is not entirely done, but so far the following modules have been updated to reach a score of at least 8:

  • graph
  • unionfind
  • maths
  • dp
  • heap
  • search
  • streaming
  • ml
  • tree

The work included the following refactors:

  • Adding doc-strings to modules and functions
  • Removing trailing white space and newlines
  • Changing variable names in order to follow PEP standards (snake_case)
  • Removing dead code
  • Removing unnecessary parenthesis.

nolanderc and others added 26 commits March 1, 2022 11:01
improves pylint score from 3.71 to 10.00

fixes #2
improves pylint score from 5.83 to 10.00.

fixes #7
…actor-unionfind

refactor(pylint): unionfind/count_islands.py
…actor-search

refactor(pylint): algorithms/search/*.py
Improves pylint score from 5.51 to 9.96.

Score is lower than 10 due to duplication between maximum_flow_bfs.py
and maximum_flow_dfs.py. However, due to the educational nature of this
repo, keeping it as is will probably be benefitial as it reduces
complexity while reading (having to jump between files).

fixes #9
a reason that lint score isn't 10.00 is that the module is called dp,
which in turn makes pylint raise invalid name for all files in dp.
I leave that as it is, since I don't want to mess with the current folder structure.

fixes #3
…factor-dp

refactor(pylint): algorithms/dp/*.py
…factor-streaming-#5

refactor (pylint): algorithms/streaming/*.py
Finished improving pylint score for maths folder.
fixes: #4
…factor-maths

refactor (pylint): algorithms/maths/
…factor-graph

refactor(pylint): algorithms/graph/*.py
…ap-16

Fix: Fixed lint error, lint value now above 8
@ankit167
Copy link
Collaborator

ankit167 commented Mar 6, 2022

Thanks for picking this up. Much needed and had been pending for a while.
Please resolve the branch conflicts.

@nolanderc
Copy link
Contributor Author

@ankit167 Done!

@ankit167 ankit167 merged commit 3259a07 into keon:master Mar 7, 2022
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.

6 participants