zerasul/blask

Fix Pylint issues

JuanjoSalvador opened this issue · 6 comments

This is a list of fixes that we need to make to improve Blask code coverage (currently 8.36/10)

************* Module Blask
Blask/__init__.py:1:0: C0103: Module name "Blask" doesn't conform to snake_case naming style (invalid-name)
************* Module Blask.blasksettings
Blask/blasksettings.py:45:0: C0301: Line too long (121/100) (line-too-long)
Blask/blasksettings.py:46:0: C0301: Line too long (103/100) (line-too-long)
Blask/blasksettings.py:38:0: R0205: Class 'BlaskSettings' inherits from object, can be safely removed from bases in python3 (useless-object-inheritance)
Blask/blasksettings.py:58:23: C0201: Consider iterating the dictionary directly instead of calling .keys() (consider-iterating-dictionary)
Blask/blasksettings.py:66:12: C0103: Variable name "kw" doesn't conform to snake_case naming style (invalid-name)
Blask/blasksettings.py:66:18: C0201: Consider iterating the dictionary directly instead of calling .keys() (consider-iterating-dictionary)
Blask/blasksettings.py:43:0: W0613: Unused argument 'args' (unused-argument)
Blask/blasksettings.py:38:0: R0903: Too few public methods (1/2) (too-few-public-methods)
************* Module Blask.blaskcli
Blask/blaskcli.py:66:18: C0303: Trailing whitespace (trailing-whitespace)
Blask/blaskcli.py:164:0: C0301: Line too long (101/100) (line-too-long)
Blask/blaskcli.py:112:55: C0103: Variable name "settingsFile" doesn't conform to snake_case naming style (invalid-name)
Blask/blaskcli.py:124:0: C0103: Constant name "blask" doesn't conform to UPPER_CASE naming style (invalid-name)
Blask/blaskcli.py:125:0: C0103: Constant name "isdebug" doesn't conform to UPPER_CASE naming style (invalid-name)
Blask/blaskcli.py:126:0: C0103: Constant name "cliController" doesn't conform to UPPER_CASE naming style (invalid-name)
Blask/blaskcli.py:174:4: C0103: Variable name "e" doesn't conform to snake_case naming style (invalid-name)
Blask/blaskcli.py:174:4: W0612: Unused variable 'e' (unused-variable)
Blask/blaskcli.py:22:0: C0411: standard import "from os import makedirs, path, getcwd" should be placed before "import click" (wrong-import-order)
Blask/blaskcli.py:23:0: C0411: third party import "from pkg_resources import get_distribution, DistributionNotFound" should be placed before "from Blask import BlaskApp, blasksettings" (wrong-import-order)
************* Module Blask.blogrenderer
Blask/blogrenderer.py:59:0: C0303: Trailing whitespace (trailing-whitespace)
Blask/blogrenderer.py:65:0: C0301: Line too long (104/100) (line-too-long)
Blask/blogrenderer.py:83:8: C0103: Variable name "md" doesn't conform to snake_case naming style (invalid-name)
Blask/blogrenderer.py:76:4: R0201: Method could be a function (no-self-use)
Blask/blogrenderer.py:87:4: W0102: Dangerous default value [] as argument (dangerous-default-value)
Blask/blogrenderer.py:87:4: W0102: Dangerous default value [] as argument (dangerous-default-value)
Blask/blogrenderer.py:87:4: R0913: Too many arguments (7/5) (too-many-arguments)
Blask/blogrenderer.py:102:27: W0108: Lambda may not be necessary (unnecessary-lambda)
Blask/blogrenderer.py:105:48: W0640: Cell variable tag defined in loop (cell-var-from-loop)
Blask/blogrenderer.py:116:4: R0201: Method could be a function (no-self-use)
Blask/blogrenderer.py:131:0: R0903: Too few public methods (1/2) (too-few-public-methods)
Blask/blogrenderer.py:24:0: W0611: Unused lru_cache imported from functools (unused-import)
Blask/blogrenderer.py:20:0: C0411: standard import "from os import path, listdir" should be placed before "from markdown import Markdown" (wrong-import-order)
Blask/blogrenderer.py:22:0: C0411: standard import "from datetime import datetime" should be placed before "from markdown import Markdown" (wrong-import-order)
Blask/blogrenderer.py:23:0: C0411: standard import "from hashlib import sha3_512" should be placed before "from markdown import Markdown" (wrong-import-order)
Blask/blogrenderer.py:24:0: C0411: standard import "from functools import lru_cache" should be placed before "from markdown import Markdown" (wrong-import-order)
************* Module Blask.errors
Blask/errors.py:25:4: W0235: Useless super delegation in method '__init__' (useless-super-delegation)

please, could you say to me how do you get this results??

Running tests. Actually from Travis-CI

Here is the last Pylint report:

************* Module Blask

Blask/__init__.py:1:0: C0103: Module name "Blask" doesn't conform to snake_case naming style (invalid-name)

************* Module Blask.blasksettings

Blask/blasksettings.py:38:0: R0205: Class 'BlaskSettings' inherits from object, can be safely removed from bases in python3 (useless-object-inheritance)

Blask/blasksettings.py:61:23: C0201: Consider iterating the dictionary directly instead of calling .keys() (consider-iterating-dictionary)

Blask/blasksettings.py:69:12: C0103: Variable name "kw" doesn't conform to snake_case naming style (invalid-name)

Blask/blasksettings.py:69:18: C0201: Consider iterating the dictionary directly instead of calling .keys() (consider-iterating-dictionary)

Blask/blasksettings.py:43:0: W0613: Unused argument 'args' (unused-argument)

Blask/blasksettings.py:38:0: R0903: Too few public methods (1/2) (too-few-public-methods)

************* Module Blask.blaskcli

Blask/blaskcli.py:73:4: C0116: Missing function or method docstring (missing-function-docstring)

Blask/blaskcli.py:78:0: C0103: Constant name "isdebug" doesn't conform to UPPER_CASE naming style (invalid-name)

Blask/blaskcli.py:133:12: E1120: No value for argument 'filepath' in unbound method call (no-value-for-parameter)

Blask/blaskcli.py:21:0: C0411: standard import "from pathlib import Path" should be placed before "from pkg_resources import get_distribution, DistributionNotFound" (wrong-import-order)

Blask/blaskcli.py:22:0: C0411: standard import "import shutil" should be placed before "from pkg_resources import get_distribution, DistributionNotFound" (wrong-import-order)

************* Module Blask.blogrenderer

Blask/blogrenderer.py:83:8: C0103: Variable name "md" doesn't conform to snake_case naming style (invalid-name)

Blask/blogrenderer.py:76:4: R0201: Method could be a function (no-self-use)

Blask/blogrenderer.py:87:4: W0102: Dangerous default value [] as argument (dangerous-default-value)

Blask/blogrenderer.py:87:4: W0102: Dangerous default value [] as argument (dangerous-default-value)

Blask/blogrenderer.py:87:4: R0913: Too many arguments (7/5) (too-many-arguments)

Blask/blogrenderer.py:114:27: W0108: Lambda may not be necessary (unnecessary-lambda)

Blask/blogrenderer.py:117:48: W0640: Cell variable tag defined in loop (cell-var-from-loop)

Blask/blogrenderer.py:139:12: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)

Blask/blogrenderer.py:148:4: R0914: Too many local variables (17/15) (too-many-locals)

Blask/blogrenderer.py:167:12: C0103: Variable name "p" doesn't conform to snake_case naming style (invalid-name)

Blask/blogrenderer.py:182:4: R0201: Method could be a function (no-self-use)

Blask/blogrenderer.py:197:0: R0902: Too many instance attributes (8/7) (too-many-instance-attributes)

Blask/blogrenderer.py:197:0: R0903: Too few public methods (1/2) (too-few-public-methods)

************* Module Blask.blaskapp

Blask/blaskapp.py:24:0: C0411: standard import "from os.path import join" should be placed before "from flask import Flask, render_template, request, abort, Response" (wrong-import-order)

************* Module Blask.errors

Blask/errors.py:26:4: W0235: Useless super delegation in method '__init__' (useless-super-delegation)

I would like to take this up. Please assign me

I already assigned the issue to you

What is the command to run travis.yml?