Skip to content

Commit

Permalink
Move source of ansibulled to a subdir.
Browse files Browse the repository at this point in the history
pyre prefers to be given the directory which holds your python package
as the source-directory rather than the directory which is your python
package.  However, if the directory given is the toplevel, pyre tends to
get slow for me.  (I believe since it scans  temporary directories that
I have accumulated [downloads of all those ansible collections...]).
Putting the soure code in its own subdirectory is the way to fix that.
  • Loading branch information
abadger committed May 21, 2020
1 parent 6c0f18c commit c5d89cb
Show file tree
Hide file tree
Showing 41 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .pylintrc.automated
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ ignore-patterns=

# Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the
# number of processors available to use.
jobs=0
jobs=1

# Control the amount of potential inferred values when inferring a single
# object. This can help the performance when dealing with large functions or
Expand Down
2 changes: 1 addition & 1 deletion lint-flake8.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash
set -e
poetry run flake8 ansibulled --count --max-complexity=10 --max-line-length=100 --statistics
poetry run flake8 src/ansibulled --count --max-complexity=10 --max-line-length=100 --statistics "$@"
2 changes: 1 addition & 1 deletion lint-mypy.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash
set -e
MYPYPATH=stubs/ poetry run mypy ansibulled
MYPYPATH=stubs/ poetry run mypy src/ansibulled "$@"
2 changes: 1 addition & 1 deletion lint-pylint.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash
set -e
poetry run pylint --rcfile .pylintrc.automated ansibulled
poetry run pylint --rcfile .pylintrc.automated src/ansibulled "$@"
2 changes: 1 addition & 1 deletion lint-pyre.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash
set -e
poetry run pyre --source-directory ansibulled --search-path $(poetry run python -c 'from distutils.sysconfig import get_python_lib;print(get_python_lib())') --search-path stubs/ --search-path .
poetry run pyre --source-directory src --search-path $(poetry run python -c 'from distutils.sysconfig import get_python_lib;print(get_python_lib())') --search-path stubs/ "$@"
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ license = "GPL-3.0-or-later"
readme = "README.md"
repository = "https://github.com/ansible-community/ansibulled"
packages = [
{ include = "ansibulled" },
{ include = "ansibulled", from="src" },
{ include = "tests", format = "sdist" }
]

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion test.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh

args=${1-tests}
python3.8 -m pytest --cov-branch --cov=ansibulled $args -vv
PYTHONPATH=src poetry run python -m pytest --cov-branch --cov=ansibulled $args -vv

0 comments on commit c5d89cb

Please sign in to comment.