Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
carlio committed Nov 30, 2021
2 parents 2d5eefc + f4f8a49 commit 3a83c93
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ repos:
- id: debug-statements
- id: check-added-large-files
- repo: https://github.com/psf/black
rev: 21.9b0
rev: 21.11b1
hooks:
- id: black
args:
Expand Down
6 changes: 4 additions & 2 deletions docs/profiles.rst
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ The available options are:
| mccabe | max-complexity | Maximum number of paths allowed in a method |
+---------+------------------------+----------------------------------------------+
| pep8 | max-line-length | Maximum line length allowed (This option is |
| | | overridden by global option max-line-length_) |
| | | overridden by global option max-line-length_)|
+---------+------------------------+----------------------------------------------+
| pylint | -anything- | Any of the `pylint options`_ |
+---------+------------------------+----------------------------------------------+
Expand All @@ -372,6 +372,8 @@ The available options are:
+---------+------------------------+----------------------------------------------+
| mypy | strict-optional | Checking of Optional types and None values |
+---------+------------------------+----------------------------------------------+
| mypy | namespace-packages | Import discovery uses namespace packages |
+---------+------------------------+----------------------------------------------+
| bandit | config | configuration filename |
+---------+------------------------+----------------------------------------------+
| bandit | profile | profile to use |
Expand All @@ -388,7 +390,7 @@ See `bandit options`_ for more details

.. _pylint options: https://pylint.readthedocs.io/en/latest/user_guide/run.html
.. _bandit options: https://bandit.readthedocs.io/en/latest/config.html
.. _mypy options: https://https://bandit.readthedocs.io/en/latest/config.html
.. _mypy options: https://mypy.readthedocs.io/en/stable/command_line.html



Expand Down
4 changes: 4 additions & 0 deletions prospector/tools/mypy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ def configure(self, prospector_config, _):
python_2_mode = options.get("python-2-mode", False)
python_version = options.get("python-version", None)
strict_optional = options.get("strict-optional", False)
namespace_packages = options.get("namespace-packages", False)

self.options.append("--follow-imports=%s" % follow_imports)

Expand All @@ -79,6 +80,9 @@ def configure(self, prospector_config, _):
if strict_optional:
self.options.append("--strict-optional")

if namespace_packages:
self.options.append("--namespace-packages")

for list_option in MYPY_OPTIONS:
for entry in options.get(list_option, []):
self.options.append("--%s-%s" % (list_option, entry))
Expand Down

0 comments on commit 3a83c93

Please sign in to comment.