fb-group-post-fetcher icon indicating copy to clipboard operation
fb-group-post-fetcher copied to clipboard

Fix type errors & lint errors

Open kkweon opened this issue 4 years ago • 0 comments

❯ pipenv run mypy .
Courtesy Notice: Pipenv found itself running within a virtual environment, so it will automatically use that environment, instead of creating its own for any project. You can set PIPENV_IGNORE_VIRTUALENVS=1 to force pipenv to ignore that environment and create its own instead. You can set PIPENV_VERBOSITY=-1 to suppress this warning.
Loading .env environment variables…
lib/model/facebook_post.py:4: error: Skipping analyzing 'markdown2': found module but no type hints or library stubs
lib/model/facebook_post.py:4: note: See https://mypy.readthedocs.io/en/latest/running_mypy.html#missing-imports
lib/model/facebook_post.py:7: error: Cannot find implementation or library stub for module named 'static.constants'
lib/model/facebook_post.py:33: error: Name 'attatchments' is not defined
lib/model/facebook_post.py:40: error: Incompatible return value type (got "None", expected "str")
lib/model/facebook_post.py:52: error: Incompatible types in assignment (expression has type "Optional[Any]", variable has type "str")
lib/model/facebook_post.py:53: error: Incompatible types in assignment (expression has type "Optional[Any]", variable has type "str")
lib/model/facebook_post.py:58: error: Incompatible return value type (got "None", expected "FacebookPost")
lib/model/facebook_post.py:60: error: Incompatible types in assignment (expression has type "str", variable has type "datetime")
lib/model/facebook_post.py:61: error: Argument 1 to "strptime" of "datetime" has incompatible type "Optional[Any]"; expected "str"
lib/model/facebook_post.py:65: error: Item "None" of "Optional[Any]" has no attribute "get"
lib/model/facebook_post.py:66: error: Item "None" of "Optional[Any]" has no attribute "get"
lib/model/facebook_post.py:67: error: Item "None" of "Optional[Any]" has no attribute "get"
lib/email_utility.py:3: error: Cannot find implementation or library stub for module named 'static.constants'
lib/email_utility.py:10: error: Skipping analyzing 'premailer': found module but no type hints or library stubs
main.py:6: error: Cannot find implementation or library stub for module named 'static.constants'
main.py:50: error: Name 'BASE_URL' is not defined
main.py:50: error: Name 'TAIL_URL' is not defined
Found 17 errors in 3 files (checked 7 source files)
❯ pipenv run pylint ./**/*.py
Courtesy Notice: Pipenv found itself running within a virtual environment, so it will automatically use that environment, instead of creating its own for any project. You can set PIPENV_IGNORE_VIRTUALENVS=1 to force pipenv to ignore that environment and create its own instead. You can set PIPENV_VERBOSITY=-1 to suppress this warning.
Loading .env environment variables…
************* Module lib.email_utility
lib/email_utility.py:30:28: C0303: Trailing whitespace (trailing-whitespace)
lib/email_utility.py:31:0: C0303: Trailing whitespace (trailing-whitespace)
lib/email_utility.py:48:0: C0304: Final newline missing (missing-final-newline)

        넘 많아서 생략 

static/constants.py:1:0: C0114: Missing module docstring (missing-module-docstring)
static/constants.py:8:14: W1309: Using an f-string that does not have any interpolated variables (f-string-without-interpolation)

------------------------------------------------------------------
Your code has been rated at 0.72/10 (previous run: 0.72/10, +0.00)

kkweon avatar Jun 23 '20 04:06 kkweon