wemake-services / flake8-eradicate

Flake8 plugin to find commented out or dead code
https://pypi.org/project/flake8-eradicate/
MIT License
310 stars 12 forks source link

Put the setuptools library in dependencies due to the use of the pkg_resources module (wemake-services#244) #245

Closed AlirezaRoshanzamir closed 2 years ago

AlirezaRoshanzamir commented 2 years ago

The distribution version of "flake8-eradicate" is obtained using "pkg_resources.get_distribution" function. So, the "setuptools" library should be added as a runtime dependency.

Note that from Python 3.8 version onwards, the better solution is to use the "importlib.metadata.version" function which is a standard library. But, "flake8-eradicate" supports Python 3.6 and 3.7 as well, so we should use the third-party equivalent "importlib-metadata" library. But for now, the easiest thing to do is to use the "setuptools" library.

codecov[bot] commented 2 years ago

Codecov Report

Merging #245 (c72535f) into master (23140b1) will not change coverage. The diff coverage is n/a.

@@            Coverage Diff            @@
##            master      #245   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines           42        42           
  Branches         8         8           
=========================================
  Hits            42        42           

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 23140b1...c72535f. Read the comment docs.