Pylint refactor by nolanderc · Pull Request #851 · keon/algorithms · GitHub
Skip to content

Pylint refactor#851

Merged
ankit167 merged 27 commits into
keon:masterfrom
KTH-Software-Engineering-DD2480:pylint-refactor
Mar 7, 2022
Merged

Pylint refactor#851
ankit167 merged 27 commits into
keon:masterfrom
KTH-Software-Engineering-DD2480:pylint-refactor

Conversation

@nolanderc

@nolanderc nolanderc commented Mar 6, 2022

Copy link
Copy Markdown
Contributor

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

ankit167 commented Mar 6, 2022

Copy link
Copy Markdown
Collaborator

@nolanderc

Copy link
Copy Markdown
Contributor Author

@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