akamhy / waybackpy

Wayback Machine API interface & a command-line tool
https://pypi.org/project/waybackpy/
MIT License
453 stars 32 forks source link

Typing #128

Closed eggplants closed 2 years ago

eggplants commented 2 years ago

Closes: #127

mypy configuraion:

https://github.com/eggplants/waybackpy/blob/639159e304f4aa31f7d0af609e1253b5b5d2be3e/setup.cfg#L70-L74

[mypy]
python_version = 3.9
show_error_codes = True
pretty = True
strict = True

$ mypy -p waybackpy -p tests
Success: no issues found in 17 source files
pep8speaks commented 2 years ago

Hello @eggplants! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! :beers:

Comment last updated at 2022-02-04 12:09:58 UTC
eggplants commented 2 years ago

https://app.codacy.com/gh/akamhy/waybackpy/pullRequest?prid=8826635

license and filter are same names as built-in functions. Could I rename them?

akamhy commented 2 years ago

https://app.codacy.com/gh/akamhy/waybackpy/pullRequest?prid=8826635

license and filter are same names as built-in functions. Could I rename them?

Yes but actually No, what I meant is to let the name stay the same for command-line usage but change them in the main function by leveraging the order specified at https://click.palletsprojects.com/en/8.0.x/options/#name-your-options.

How about adding --showlicense and --cdxfilter respectively to the option() decorator of license and filter and using them in the main function?

If you agree then please go ahead and make the required changes or suggest what you think would be better.