Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[flake8]
max-line-length = 88
ban-relative-imports = True
mypy-init-return = True
format-greedy = 1

ignore = E501, W503, ANN101, ANN102, FS001
per-file-ignores =
__init__.py:F401
tests/basetest.py:ANN002,ANN003,ANN201,ANN204
tests/test_*:ANN002,ANN003,ANN201,ANN204
tests/**/test_*:ANN002,ANN003,ANN201,ANN204
exclude =
.git
__pycache__
build
dist
.venv
.tox
.pytest_cache
.github
src/poetry/core/_vendor/*
tests/fixtures/*
tests/**/fixtures/*
17 changes: 17 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,20 @@ repos:
- id: end-of-file-fixer
exclude: ^tests/fixtures/resultados/.*\.html?$
- id: check-yaml

- repo: https://github.com/PyCQA/flake8
rev: 3.9.2
hooks:
- id: flake8
additional_dependencies:
- flake8-annotations
- flake8-bugbear
- flake8-comprehensions
- flake8-tidy-imports
- flake8-use-fstring

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.910-1
hooks:
- id: mypy
pass_filenames: false
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ Todas as mudanças de destaque nesse projeto será documentado neste arquivo.
## [Não publicado]

### Adicionado
- Suporte à consulta e conferência da Loteria Federal.
- [x] Suporte à consulta e conferência da Loteria Federal.
- [ ] Extrato de consultas funcionam com o novo site da CEF.

### Modificado
- Projeto migrado de `setup.py` para [poetry]
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
sorte.py
========

![PyPI - Python Version](https://img.shields.io/pypi/pyversions/sorte.py)
[![PyPI](https://img.shields.io/pypi/v/sorte.py)](https://pypi.org/project/sorte.py)

> AVISO
> -----
>
>
> `sorte.py` não consegue fazer mais consultas (o que também afeta as conferências),
> desde que a Caixa mudou drasticamente o sistema. Este problema está sendo investigado.
>
>
> Veja https://github.com/wagnerluis1982/sorte.py/pull/4

Sobre
Expand Down
Empty file removed conftest.py
Empty file.
200 changes: 195 additions & 5 deletions poetry.lock

Large diffs are not rendered by default.

29 changes: 27 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ packages = [
{ include = "sortepy", from = "src" }
]
include = [
"CHANGELOG.md",
{ path = "CHANGELOG.md" },
{ path = "tests", format = "sdist" },
]

Expand All @@ -39,10 +39,13 @@ classifiers = [
"sorte.py" = "sortepy.script:main"

[tool.poetry.dependencies]
python = "^3.8"
python = "^3.10"
requests = "^2.26.0"

[tool.poetry.dev-dependencies]
pytest = "^6.2.5"
pytest-cov = "^3.0.0"
pytest-srcpaths = "^1.2.1"
pre-commit = "^2.15.0"

[build-system]
Expand All @@ -51,6 +54,9 @@ build-backend = "poetry.core.masonry.api"

[tool.pytest.ini_options]
minversion = "6.0"
pythonpath = [
"src",
]
testpaths = [
"tests",
]
Expand All @@ -67,3 +73,22 @@ known_first_party = "sortepy"

[tool.black]
line-length = 88

[tool.mypy]
mypy_path = "src"
files = "src, tests"
follow_imports = "silent"
show_error_codes = true
explicit_package_bases = true
namespace_packages = true
strict_optional = false

[[tool.mypy.overrides]]
module = [
'tests.basetest',
'tests.patchs',
'tests.fixtures',
'tests.test_script',
'tests.test_util',
]
ignore_errors = true
Empty file removed src/sortepy/__init__.py
Empty file.
Loading