LLNL / scraper

Python library for getting metadata from source code hosting tools
MIT License
49 stars 23 forks source link

Code cleanups based on `pylint` linting #67

Closed mcdonnnj closed 2 years ago

mcdonnnj commented 2 years ago

This pull request is an assortment of small changes based on running pylint with a default configuration with the following (modified from default) list of disabled checks:

disable=raw-checker-failed,
        bad-inline-option,
        locally-disabled,
        file-ignored,
        suppressed-message,
        useless-suppression,
        deprecated-pragma,
        use-symbolic-message-instead,
        too-many-arguments,
        too-many-locals,
        too-many-return-statements,
        line-too-long,
        missing-module-docstring,
        missing-class-docstring,
        missing-function-docstring,
        invalid-name,
        too-few-public-methods,
        too-many-branches,
        too-many-instance-attributes,
        too-many-statements,
        fixme,
        consider-using-f-string,
        super-init-not-called,
        protected-access

All other items flagged were fixed. I also noticed an issue with how the messages for raise calls in scraper/tfs/__init__.py were formatted and fixes those while I was making these changes.

mcdonnnj commented 2 years ago

Overall I'm really happy with this... In fact, I've used black a lot more since my time working actively on this.. that would be another good pass to make over the code for configuration / styling.

Yes we (over at @cisagov) lean heavily on pre-commit for code quality checking and our configuration includes the same tools you use here. I've been looking at integrating pylint into our configuration but fine-tuning the .pylintrc file across both our more modern projects and our legacy projects is a balancing act.