Skip to content

Commit

Permalink
Add tox config, fix style
Browse files Browse the repository at this point in the history
  • Loading branch information
erikmansson committed May 25, 2021
1 parent 4b993c0 commit 3b3ce37
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 13 deletions.
20 changes: 8 additions & 12 deletions ferrit.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
import argparse
import json
import os
import sys
import re
from subprocess import run, CalledProcessError, PIPE, DEVNULL
import json
import argparse
import sys
from functools import partial
from subprocess import DEVNULL, PIPE, CalledProcessError, run
from urllib.parse import quote, urljoin, urlparse

import requests
from requests_futures.sessions import FuturesSession
import urllib3
from urllib.parse import quote, urljoin, urlparse
from pkg_resources import (
get_distribution,
DistributionNotFound,
RequirementParseError,
)
from pkg_resources import DistributionNotFound, RequirementParseError, get_distribution
from requests_futures.sessions import FuturesSession


urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
Expand All @@ -23,7 +20,6 @@
except (DistributionNotFound, RequirementParseError):
__version__ = None


GITARGS = ["git", "-c", "advice.detachedHead=false"]


Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"console_scripts": [
"fe=ferrit:main",
"ferrit=ferrit:main",
]
],
},
zip_safe=True,
use_scm_version=True,
Expand Down
50 changes: 50 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
[flake8]
max-line-length = 99
exclude =
.git,
.tox,
.vscode,
__pycache__,
build,
dist,
*.egg-info,
env,
venv,
.eggs,
ignore =
E133,
W503,
E741,
B007,
C819,
FS003,

[isort]
line_length = 99
lines_after_imports = 2
multi_line_output = 3
indent = 4
include_trailing_comma = true
skip =
.git,
.tox,
.vscode,
__pycache__,
build,
dist,
*.egg-info,
env,
venv,
.eggs,

[testenv]
deps =
flake8
flake8-bugbear
flake8-commas
flake8-comprehensions
flake8-isort
flake8-mutable
flake8-walrus
commands =
flake8

0 comments on commit 3b3ce37

Please sign in to comment.