Code Monkey home page Code Monkey logo

flake8-scrapy's Introduction

Hi there ๐Ÿ‘‹

I am Valdir, a Brazilian software developer with years of experience leading teams and building software.

My experience includes:

  • ๐Ÿš… Building REST APIs with Django and DRF;
  • โœจ Creating configurable UIs with Vue.js;
  • ๐Ÿ”Œ Managing AWS-based infrastructure;
  • ๐ŸŒ Crawling the web in large scale;
  • :shipit: Improving development experience;
  • ๐ŸŽ“ Teaching and mentoring;
  • โœ’๏ธ Technical writing.

Check out my blog: stummjr.github.io

flake8-scrapy's People

Contributors

rocioar avatar stummjr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

luyumeng1 prime-5

flake8-scrapy's Issues

Failed SCP03 rule check

When starting the fakehaven stage in CI, I received the following error:

$ flakeheaven lint --format=grouped --exit-zero --import-order-style pep8 --application-import-names directories
multiprocessing.pool.RemoteTraceback: 
"""
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/multiprocessing/pool.py", line 121, in worker
    result = (True, func(*args, **kwds))
  File "/usr/local/lib/python3.7/multiprocessing/pool.py", line 44, in mapstar
    return list(map(*args))
  File "/usr/local/lib/python3.7/site-packages/flake8/checker.py", line 687, in _run_checks
    return checker.run_checks()
  File "/usr/local/lib/python3.7/site-packages/flakeheaven/_patched/_checkers.py", line 282, in run_checks
    return super().run_checks()
  File "/usr/local/lib/python3.7/site-packages/flake8/checker.py", line 597, in run_checks
    self.run_ast_checks()
  File "/usr/local/lib/python3.7/site-packages/flake8/checker.py", line 500, in run_ast_checks
    for (line_number, offset, text, _) in runner:
  File "/usr/local/lib/python3.7/site-packages/flake8_scrapy.py", line 55, in run
    finder.visit(self.tree)
  File "/usr/local/lib/python3.7/ast.py", line 271, in visit
    return visitor(node)
  File "/usr/local/lib/python3.7/ast.py", line 279, in generic_visit
    self.visit(item)
  File "/usr/local/lib/python3.7/ast.py", line 271, in visit
    return visitor(node)
  File "/usr/local/lib/python3.7/ast.py", line 279, in generic_visit
    self.visit(item)
  File "/usr/local/lib/python3.7/ast.py", line 271, in visit
    return visitor(node)
  File "/usr/local/lib/python3.7/site-packages/flake8_scrapy.py", line 38, in visit_Assign
    self.find_issues_visitor('Assign', node)
  File "/usr/local/lib/python3.7/site-packages/flake8_scrapy.py", line 35, in find_issues_visitor
    self.generic_visit(node)
  File "/usr/local/lib/python3.7/ast.py", line 281, in generic_visit
    self.visit(value)
  File "/usr/local/lib/python3.7/ast.py", line 271, in visit
    return visitor(node)
  File "/usr/local/lib/python3.7/site-packages/flake8_scrapy.py", line 41, in visit_Call
    self.find_issues_visitor('Call', node)
  File "/usr/local/lib/python3.7/site-packages/flake8_scrapy.py", line 35, in find_issues_visitor
    self.generic_visit(node)
  File "/usr/local/lib/python3.7/ast.py", line 279, in generic_visit
    self.visit(item)
  File "/usr/local/lib/python3.7/ast.py", line 271, in visit
    return visitor(node)
  File "/usr/local/lib/python3.7/ast.py", line 281, in generic_visit
    self.visit(value)
  File "/usr/local/lib/python3.7/ast.py", line 271, in visit
    return visitor(node)
  File "/usr/local/lib/python3.7/site-packages/flake8_scrapy.py", line 41, in visit_Call
    self.find_issues_visitor('Call', node)
  File "/usr/local/lib/python3.7/site-packages/flake8_scrapy.py", line 34, in find_issues_visitor
    self.issues.extend(list(issues))
  File "/usr/local/lib/python3.7/site-packages/finders/oldstyle.py", line 18, in find_issues
    if first_param.value.id == 'response' and first_param.attr == 'url':
AttributeError: 'Attribute' object has no attribute 'id'
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/usr/local/bin/flakeheaven", line 8, in <module>
    sys.exit(entrypoint())
  File "/usr/local/lib/python3.7/site-packages/flakeheaven/_cli.py", line 40, in entrypoint
    exit_code, msg = main(argv)
  File "/usr/local/lib/python3.7/site-packages/flakeheaven/_cli.py", line 32, in main
    return COMMANDS[command_name](argv=argv[1:])
  File "/usr/local/lib/python3.7/site-packages/flakeheaven/commands/_lint.py", line 12, in lint_command
    app.run(argv)
  File "/usr/local/lib/python3.7/site-packages/flake8/main/application.py", line 375, in run
    self._run(argv)
  File "/usr/local/lib/python3.7/site-packages/flake8/main/application.py", line 364, in _run
    self.run_checks()
  File "/usr/local/lib/python3.7/site-packages/flake8/main/application.py", line 271, in run_checks
    self.file_checker_manager.run()
  File "/usr/local/lib/python3.7/site-packages/flake8/checker.py", line 309, in run
    self.run_parallel()
  File "/usr/local/lib/python3.7/site-packages/flake8/checker.py", line 275, in run_parallel
    for ret in pool_map:
  File "/usr/local/lib/python3.7/multiprocessing/pool.py", line 354, in <genexpr>
    return (item for chunk in result for item in chunk)
  File "/usr/local/lib/python3.7/multiprocessing/pool.py", line 748, in next
    raise value
AttributeError: 'Attribute' object has no attribute 'id'

The problem occurs in this line:

urljoin(settings.SERVICE_URLS.PD, '/path')

Where are the settings:

from pydantic import BaseSettings, BaseModel

class ServiceUrlsSchema(BaseModel):
    PD: str

class Settings(BaseSettings):
    SERVICE_URLS: ServiceUrlsSchema

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.