Skip to content

Commit

Permalink
Small fixes to dev environment
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcelloPerathoner committed Sep 24, 2023
1 parent af41b65 commit 154c923
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 3 deletions.
21 changes: 21 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# http://editorconfig.org

root = true

[*]
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
insert_final_newline = true
charset = utf-8
end_of_line = lf

[*.bat]
indent_style = tab
end_of_line = crlf

[LICENSE]
insert_final_newline = false

[Makefile]
indent_style = tab
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ profile:
$(BIN)python -O -m scripts.profile

docs:
cd docs; make html
cd docs; make SPHINXBUILD='../$(BIN)python -msphinx' html

tox:
$(BIN)tox
Expand All @@ -68,7 +68,7 @@ uninstall:
$(BIN)pip uninstall suffix_tree

clean:
-rm -rf dist build *.egg-info
-rm -rf dist build htmlcov .mypy_cache .pytest_cache .tox *.egg-info
-rm docs/_images/badge*.svg
-rm *~ .*~ pylintgraph.dot
-find . -name __pycache__ -type d -exec rm -r "{}" \;
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ black
blackdoc
build
coverage[toml]
hatchling
mypy
pydocstyle
pylint
Expand Down
5 changes: 4 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ def __init__(self, option_strings, dest, nargs=None, **kwargs):
super().__init__(option_strings, dest, **kwargs)

def __call__(self, parser, namespace, values, option_string=None):
"""This is called if the --debug-mode option is passed to pytest."""
if option_string in self.option_strings:
util.DEBUG = True
util.DEBUG_LABELS = True
Expand All @@ -60,7 +61,9 @@ def __call__(self, parser, namespace, values, option_string=None):


def pytest_addoption(parser):
parser.addoption("--performance", action="store_true", help="run performance tests")
parser.addoption(
"--performance", action="store_true", help="run performance tests"
)
parser.addoption(
"--debug-mode", action=DebugAction, help="turn on DEBUG mode while testing"
)
Expand Down

0 comments on commit 154c923

Please sign in to comment.