Skip to content

house keeping update #372

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 25, 2021
Merged
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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ __pycache__
.tox/
venv
.vscode/
.python-version
.python-version
.coverage
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ language: python

jobs:
include:
- python: "3.7"
env: TOXENV=py37
- python: "3.8"
env: TOXENV=py38
- python: "3.9"
env: TOXENV=py39

Expand Down
7 changes: 3 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,8 @@ ifeq ("$(wildcard venv/bin/pip-sync)","")
endif

# pip-tools
@pip-compile --upgrade requirements-dev.txt
@pip-compile --upgrade requirements.txt
@pip-sync requirements-dev.txt requirements.txt
# @pip-compile --upgrade requirements-dev.txt
@pip-sync requirements-dev.txt


.PHONY: pylinter
Expand Down Expand Up @@ -85,4 +84,4 @@ endif
--select "B,C,E,F,W,T4,B9" \
--ignore "E203,E266,E501,W503,F403,F401,E402" \
--exclude ".git,__pycache__,old, build, \
dist, venv" $(path)
dist, venv, .tox" $(path)
8 changes: 6 additions & 2 deletions patterns/behavioral/iterator.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,12 @@ def count_to(count):


# Test the generator
count_to_two = lambda: count_to(2)
count_to_five = lambda: count_to(5)
def count_to_two() -> None:
return count_to(2)


def count_to_five() -> None:
return count_to(5)


def main():
Expand Down
8 changes: 5 additions & 3 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
-e .

pytest~=4.3.0
pytest-cov~=2.6.0
flake8~=3.7.0
pytest~=6.2.0
pytest-cov~=2.11.0
pytest-randomly~=3.1.0
black>=20.8b1
isort~=5.7.0
flake8~=3.8.0
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[flake8]
max-line-length = 120
ignore = E266 E731 W503
exclude = .venv*
exclude = venv*

[tool:pytest]
filterwarnings =
Expand Down
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,7 @@
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
],
)
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py37,py38,py39,cov-report
envlist = py38,py39,cov-report
skip_missing_interpreters = true


Expand All @@ -9,7 +9,7 @@ setenv =
deps =
-r requirements-dev.txt
commands =
flake8 . --exclude=./.*
flake8 . --exclude="./.*, venv"
; `randomly-seed` option from `pytest-randomly` helps with deterministic outputs for examples like `other/blackboard.py`
pytest --randomly-seed=1234 --doctest-modules patterns/
pytest -s -vv --cov={envsitepackagesdir}/patterns --log-level=INFO tests/
Expand Down