Skip to content

Commit

Permalink
Virtualenv v16 (#405)
Browse files Browse the repository at this point in the history
* Pin virtualenv to v16

tox-dev/tox#1516

* Add --rm to docker run commands

* Pylint: check unused import in __init__.py files
  • Loading branch information
ovv authored Feb 11, 2020
1 parent 6f3c29f commit bbdc2cf
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
5 changes: 5 additions & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ ignore = .git, .venv, .tox, .env, migrations, tests
persistent = no
jobs = 4

[VARIABLES]

# Tells whether we should check for unused import in __init__ files.
init-import=yes

[MESSAGES CONTROL]
disable =
bad-continuation,
Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@ While you can allow for CircleCI to run tests/checks, running locally simply use
```bash
# if you need to rebuild first, `docker-compose build`

$ docker-compose run web tox
$ docker-compose run --rm web tox
```

Tox forwards positional arguments to pytest, that way you can use all standard pytest arguments. For example, only running a specific test can be done like this:

```bash
$ docker-compose run web tox -e py37 tests/test_website.py::test_endpoint_index
$ docker-compose run --rm web tox -e py37 tests/test_website.py::test_endpoint_index
```

To run the black auto-formatter on the code you can use:

```bash
$ docker-compose run web tox -e autoformat
$ docker-compose run --rm web tox -e autoformat
```

# The Involved Path
Expand Down
5 changes: 1 addition & 4 deletions pyslackersweb/__init__.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
import logging
import logging.config
import os
import pathlib
import yaml

import aioredis
import sentry_sdk
from aiohttp import ClientSession, web
from aiohttp import web
from aiohttp_remotes import XForwardedRelaxed, ForwardedRelaxed
from sentry_sdk.integrations.aiohttp import AioHttpIntegration
from sentry_sdk.integrations.logging import LoggingIntegration
Expand Down
5 changes: 1 addition & 4 deletions pyslackersweb/website/__init__.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import os
from pathlib import Path

from aiohttp import ClientSession, web
from aiohttp import web
from aiohttp_jinja2 import setup as jinja2_setup, request_processor
from aioredis.abc import AbcConnection as RedisConnection
from apscheduler.schedulers.base import BaseScheduler
from jinja2 import FileSystemLoader
from jinja2.filters import FILTERS

Expand Down
1 change: 1 addition & 0 deletions requirements/testing.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ pytest-aiohttp==0.3.0
tox==3.14.0
mypy==0.740
asynctest==0.13.0
virtualenv==16.0.0

0 comments on commit bbdc2cf

Please sign in to comment.