Broken MRO

This commit is contained in:
Eriks K 2020-12-17 14:03:30 +02:00
parent 23d682959d
commit 661a019b0a
12 changed files with 16 additions and 52 deletions

1
.gitignore vendored
View File

@ -37,7 +37,6 @@ pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache

View File

@ -1,14 +0,0 @@
# Config file for automatic testing at travis-ci.org
language: python
python:
- 3.8
- 3.7
# Command to install dependencies, e.g. pip install -r requirements_dev.txt --use-mirrors
install: pip install -U tox-travis
# Command to run tests, e.g. python setup.py test
script: tox

View File

@ -47,7 +47,6 @@ clean-pyc: ## remove Python file artifacts
rm -rf log/
clean-test: ## remove test and coverage artifacts
rm -fr .tox/
rm -f .coverage
rm -fr htmlcov/
rm -fr .pytest_cache
@ -58,9 +57,6 @@ lint: ## check style with flake8
test: ## run tests quickly with the default Python
python setup.py test
test-all: ## run tests on every Python version with tox
tox
coverage: ## check code coverage quickly with the default Python
coverage run --source erepublik setup.py test
coverage report -m
@ -80,6 +76,7 @@ servedocs: docs ## compile the docs watching for changes
release: dist ## package and upload a release
twine upload dist/*
clean
dist: clean ## builds source and wheel package
python setup.py sdist

View File

@ -6,7 +6,7 @@ __author__ = """Eriks Karls"""
__email__ = 'eriks@72.lv'
__version__ = '0.23.3.2'
from erepublik import classes, utils, constants
from erepublik import classes, constants, utils
from erepublik.citizen import Citizen
__all__ = ["classes", "utils", "Citizen", 'constants']

View File

@ -11,7 +11,7 @@ from typing import Any, Dict, List, NoReturn, Optional, Set, Tuple, Union
from requests import HTTPError, RequestException, Response
from . import utils, classes, access_points, constants
from . import access_points, classes, constants, utils
from .classes import OfferItem

View File

@ -3,11 +3,11 @@ import hashlib
import threading
import weakref
from decimal import Decimal
from typing import Any, Dict, List, NamedTuple, Tuple, Union, NoReturn, Generator, Iterable
from typing import Any, Dict, Generator, Iterable, List, NamedTuple, NoReturn, Tuple, Union
from requests import Response, Session, post
from . import utils, constants
from . import constants, utils
__all__ = ['Battle', 'BattleDivision', 'BattleSide', 'Company', 'Config', 'Details', 'Energy', 'ErepublikException',
'ErepublikNetworkException', 'EnergyToFight',

View File

@ -10,7 +10,7 @@ import unicodedata
import warnings
from decimal import Decimal
from pathlib import Path
from typing import Any, List, Optional, Union, Dict
from typing import Any, Dict, List, Optional, Union
import requests
@ -158,6 +158,7 @@ def write_file(filename: str, content: str) -> int:
def write_request(response: requests.Response, is_error: bool = False):
from erepublik import Citizen
# Remove GET args from url name
url = response.url
last_index = url.index("?") if "?" in url else len(response.url)

View File

@ -1,6 +1,6 @@
from datetime import timedelta
from erepublik import Citizen, utils, constants
from erepublik import Citizen, constants, utils
CONFIG = {
'email': 'player@email.com',

View File

@ -4,16 +4,15 @@ edx-sphinx-theme==1.5.0
flake8==3.8.4
ipython>=7.19.0
isort==5.6.4
pip==20.3.1
pip==20.3.3
PyInstaller==4.1
pytz==2020.4
pytest==6.1.2
pytest==6.2.1
responses==0.12.1
setuptools==51.0.0
Sphinx==3.3.1
requests==2.25.0
requests>=2.24.0,<2.26.0
PySocks==1.7.1
tox==3.20.1
twine==3.2.0
watchdog==1.0.0
wheel==0.36.1
wheel==0.36.2
pur==5.3.0

View File

@ -18,13 +18,13 @@ replace = __version__ = '{new_version}'
universal = 1
[flake8]
exclude = docs,.tox,.git,log,debug,venv
exclude = docs,.git,log,debug,venv
max-line-length = 120
ignore = D100,D101,D102,D103
[pycodestyle]
max-line-length = 120
exclude = .tox,.git,log,debug,venv, build
exclude = .git,log,debug,venv, build
[mypy]
python_version = 3.7

View File

@ -13,7 +13,7 @@ with open('HISTORY.rst') as history_file:
requirements = [
'pytz==2020.4',
'requests==2.25.0',
'requests>=2.24.0,<2.26.0',
'PySocks==1.7.1'
]

18
tox.ini
View File

@ -1,18 +0,0 @@
[tox]
envlist = py37, py38, flake8
[travis]
python =
3.7: py37
3.8: py38
[testenv:flake8]
basepython = python
deps = flake8
commands = flake8 erepublik_script
[testenv]
setenv =
PYTHONPATH = {toxinidir}
commands = python setup.py test