Skip to content
This repository has been archived by the owner on Oct 2, 2023. It is now read-only.

Commit

Permalink
Adiciona isort ao pre-commit (#28)
Browse files Browse the repository at this point in the history
* Adiciona isort

* Corrige ordem dos imports

* Corrige conflito do isort com o black
  • Loading branch information
anapaulagomes committed Dec 23, 2019
1 parent 9bf846e commit 89c581c
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 9 deletions.
6 changes: 6 additions & 0 deletions .isort.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[settings]
multi_line_output=3
include_trailing_comma=True
force_grid_wrap=0
use_parentheses=True
line_length=88
4 changes: 4 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ repos:
rev: 3.7.6
hooks:
- id: flake8
- repo: https://github.com/pre-commit/mirrors-isort
rev: v4.3.21
hooks:
- id: isort
- repo: https://github.com/ambv/black
rev: stable
hooks:
Expand Down
7 changes: 3 additions & 4 deletions scraper/scraper/pipelines.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
from scraper.settings import FILES_STORE, KEEP_FILES
import hashlib
import os

import hashlib
from scraper.settings import FILES_STORE, KEEP_FILES
from scrapy.pipelines.files import FilesPipeline
from scrapy.utils.python import to_bytes
from six.moves.urllib.parse import urlparse

from scrapy.pipelines.files import FilesPipeline
from tika import parser


Expand Down
1 change: 1 addition & 0 deletions scraper/scraper/settings.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os

from .items import (
CityCouncilAgendaItem,
CityHallBidItem,
Expand Down
2 changes: 1 addition & 1 deletion scraper/scraper/spiders/citycouncil.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from datetime import datetime
from scraper.items import CityCouncilAgendaItem

import scrapy
from scraper.items import CityCouncilAgendaItem


class AgendaSpider(scrapy.Spider):
Expand Down
5 changes: 3 additions & 2 deletions scraper/scraper/spiders/cityhall.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
from datetime import datetime, date, timedelta
import re
from datetime import date, datetime, timedelta

from scraper.items import CityHallBidItem, CityHallContractItem, CityHallPaymentsItem
import scrapy
from scraper.items import CityHallBidItem, CityHallContractItem, CityHallPaymentsItem

from .utils import identify_contract_id


Expand Down
4 changes: 3 additions & 1 deletion scraper/scraper/spiders/gazette.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
from datetime import datetime

import scrapy
from scrapy import Request
from scraper.items import GazetteEventItem, LegacyGazetteItem
from scrapy import Request

from .utils import replace_query_param


Expand Down
2 changes: 1 addition & 1 deletion scraper/scraper/validators.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from schematics.models import Model
from schematics.types import (
DateType,
DateTimeType,
DateType,
DictType,
IntType,
ListType,
Expand Down

0 comments on commit 89c581c

Please sign in to comment.